Home Dashboard Directory Help
Search

Wrong FrameworkDir in Microsoft.Common.targets by Admiral_Snyder


Status: 

Closed
 as Fixed Help for as Fixed


3
0
Sign in
to vote
Type: Bug
ID: 530175
Opened: 2/2/2010 11:51:25 AM
Access Restriction: Public
0
Workaround(s)
view
3
User(s) can reproduce this bug

Description

... in the final version of .net framework 4, this problem still isn't solved. instead, FrameworkDir is set to TargetFramework20DirectoryItem if $(FrameworkDir) is empty. I cannot see where $(FrameworkDir) is set initially, except for build scripts.
But even if it was nonempty, it should be set to TargetFramework40DirectoryItem, because .net framework 4 brings new binaries like regasm.

please correct this in the next version or correct me, if my assumption is wrong.

... Just installed the Release Candidate. the problem was not corrected.

Hi,
the Property FrameworkDir in the "C:\windows\Microsoft.NET\Framework\v4.0.21006\Microsoft.Common.targets" file ist set to @(_TargetFramework20DirectoryItem).

this makes no sense if you want to develop for the 4.0 .net platform and use e.g. regasm as a prebuild-command, as i did.

Just don't forget to correct it in the final, and maybe notify it somewhere.
Details
Sign in to post a comment.
Posted by johnw_at_abb on 8/3/2010 at 12:51 PM
After upgrading from vs2008 to vs2010 our msbuild file no longer worked. We use $(FrameworkDir) in several targets. This symbol has apparently changed. We tried several fixes and struggled to get a fixt that worked for both command line builds and interactive build using devenv.exe. After finding this post we added
<FrameworkDir>@(_TargetFramework20DirectoryItem)</FrameworkDir> to our Common.Targets file and were able to leave all the $(FrameworkDir) references as is. This workaround worked for both the command line build and interactive builds.

We have:
VS Microsoft Visual Studio 2010
Version 10.0.30319.1 RTMRel
Microsoft .NET Framework
Version 4.0.30319 RTMRel

Installed Version: Professional

Posted by Microsoft on 6/21/2010 at 2:02 PM
We have fixed this issue in the RTM of the product.

I am resolving this issue as fixed.

Thanks for your help!

Chuck England
Visual Studio
Program Manager - MSBuild
Posted by Microsoft on 2/19/2010 at 4:23 PM
I noticed a typo in my response to you. If should say the $(Framework40Dir). Left out the parenthesis.

Unfortunately, with the RC (Release Candidate) just release, we cannot fix for this cycle. But, we have postponed so that we can look at fixing it in a future cycle.

Thanks,

Chuck England
Visual Studio Platform
Program Manager - MSBuild
Posted by Admiral_Snyder on 2/6/2010 at 2:00 PM
Hello,

i just fixed the entry in the .targets file. worked fine.
using the Framwork40Dir-property doesn't work for me, nor does setting the properties manually, because the project is develloped using both VS2008 (usually) and VS2010 (on my computer).

I just wanted to make sure that the error is notified, to be fixed in the final.

I was very happy to read your feedback.

Thanks again,

Alex
Posted by Microsoft on 2/5/2010 at 2:38 PM
Thank you for your feedback. We will not be fixing this issue at this time due to where we are in the current development cycle and the bug bar we are using.

There are however two workarounds which you could use to get around this issue.

1) Use the $Framework40Dir) property, this property is set to the 4.0 framework directory.

2)If you still want or need to use FrameworkDir then you will need to set the property after the import of either the common or csharp / visual basic targets.

For example.
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
    <FrameworkDir>@(_TargetFramework40DirectoryItem)</FrameworkDir>
</PropertyGroup>


Posted by Microsoft on 2/2/2010 at 8:45 PM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.

Thank you
Sign in to post a workaround.