Import scriptsharp.targets request #174

Closed
dmcweeney opened this Issue Apr 27, 2012 · 2 comments

2 participants

@dmcweeney

Hi,

Would it be possible to change the import for the scriptsharp.targets from

<Import Project="$(ProgramFiles)\ScriptSharp\v1.0\ScriptSharp.targets" />

to

<Import Project="$(MSBuildProgramFiles32)\ScriptSharp\v1.0\ScriptSharp.targets" />

ProgramFiles does not resolve correctly on 64 bit machines when running from the msbuild command line wheras the MSBuildProgramFiles32 does.

Thanks

Donal

@nikhilk
Owner

You mean in every project template, right? Does MSBuildProgramFiles32 work everywhere? Can you confirm?
All my machines where I run are also 64-bit as well, so can't verify easily, but I also didn't see any issue with projects.

@dmcweeney

I'm running VS2010 on x64 box. All works fine when compiling/building within VS. Its when I run msbuild from the command line that it breaks and cannot resolve the scriptsharp targets. To get around this I replace the following 2 lines from the ss .csproj file.

<ReferencePath>$(MSBuildProgramFiles32)\ScriptSharp\v1.0\Framework\</ReferencePath>

<Import Project="$(MSBuildProgramFiles32)\ScriptSharp\v1.0\ScriptSharp.targets" />

And all works fine then from within VS and MSBuild command line.
I believe this property was added in msbuild v4 and found the following here:
http://msdn.microsoft.com/en-us/library/ms164309.aspx

MSBuildProgramFiles32 -- always points to the 32 bit program files folder, even on a 64-bit OS. To get the regular program files folder, you can just use $(ProgramFiles).

Thanks

Donal

@nikhilk nikhilk closed this in 20ce7d3 May 29, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment