This is a migrated thread and some comments may be shown as answers.

VS 2010 runtime version v4.0.30319

5 Answers 290 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Greg Brondo
Top achievements
Rank 1
Greg Brondo asked on 14 May 2010, 02:08 AM
Got a project I want to be targeted for the .Net 3.5 Framwork

Define some classes compile it. Create another project in the same solution.
in the second project I ref the first project. (or its dll, either way)
The runtime version is specified as v2.0.50727.
Then I enable some fields and classes for open access persistance.
Then I enable to project for use ORM. Recompile.
Now my runtime version is specified as 4.0.30319.
I check all the refs in my first project and they are all listed with a runtime version of 
v2.0.50727.

So I think a dll one of these refs is dependant on is a 4.0 dll.

I use dependancy walker to check a few of them and MSCOREE.DLL is a dependant. which is listed as version 
4.0.311106

So why is project 1 targeting a 4.x runtime after ORM enabling it? How can I stop this. I need the project to stay at 3.5

5 Answers, 1 is accepted

Sort by
0
PetarP
Telerik team
answered on 14 May 2010, 12:13 PM
Hello Greg Brondo,

This is a known issue. Our enhancer is always generating .NET 4.0 assemblies if it is started in the default way. We are currently working on a fix for that.
The workaround is to use the post build event to start the enhancer:
"c:\programs files\telerik\openaccess orm\sdk\venhance.exe" "-assembly:$(TargetPath)"
Please replace the path and set the event to 'when the build updates the project output'.

You can also use the OpenAccess targets file. Additional information can be found here.

Best wishes,
Petar
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Greg Brondo
Top achievements
Rank 1
answered on 14 May 2010, 02:39 PM
This first workaround doesn't work. I have added the command line argument to the post build event and it is getting called corectly. I have followed the instructions correctly. But, the dll still gets compiled to .net 4 assemblies. As for the second workaround I do not completely understand all the things it is suggesting I try yet. I could eventually work through it, but I would much rather use the first much simpler workaround. Any ideas why it didn't work?
0
Greg Brondo
Top achievements
Rank 1
answered on 14 May 2010, 03:04 PM
If the point of the second workaround is to get this line into your csproj file "<Import Project="$(MSBuildExtensionsPath)\OpenAccess.targets" /> " so that the OpenAccess.targets file gets imported which contains the line
"<UsingTask TaskName="OpenAccessEnhancer"    
    Condition=" '$(UseOpenAccessTargets)' == 'true' " AssemblyFile="$(VEnhanceAssembly)"/>"

I have done that and recompiled, this also didn't fix the issue.
0
PetarP
Telerik team
answered on 14 May 2010, 03:19 PM
Hi Greg Brondo,

Should you decide to use the post build command you will have to switch off the enhancing of your project from its properties in order to prevent the enhancer being run twice. This should fix your problem.

Sincerely yours,
Petar
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Greg Brondo
Top achievements
Rank 1
answered on 14 May 2010, 04:27 PM
Minor details... This worked though :^)
Tags
General Discussions
Asked by
Greg Brondo
Top achievements
Rank 1
Answers by
PetarP
Telerik team
Greg Brondo
Top achievements
Rank 1
Share this question
or