mikefourie-zz / MSBuildExtensionPack

MIT License
366 stars 104 forks source link

4.0.15.0 installer path is wrong #75

Closed unruledboy closed 5 years ago

unruledboy commented 6 years ago

https://github.com/mikefourie/MSBuildExtensionPack/releases/tag/4.0.15.0

the installer path is

C:\Program Files\MSBuildExtensionPack\4.0\ (missing slash between MSBuild and ExntensionPack)

rather than

C:\Program Files\MSBuild\ExtensionPack\4.0\

and causes trouble, like keep telling can't find "vsjlib.dll", and misleading to Visual J# installation problems -> wrong way.

mikefourie-zz commented 6 years ago

Hi, that path is intentional. What issue are you seeing?

MartinSGill commented 6 years ago
<Import Project="$(MSBuildExtensionsPath)\ExtensionPack\4.0\MSBuild.ExtensionPack.tasks"/>

No longer works. As $(MSBuildExtensionsPath) is C:\Program Files (x86)\MSBuild\ set here: https://github.com/Microsoft/msbuild/blob/30b19e9f2cefb6d9675d660c8bb8b317c06ff9a1/src/MSBuild/app.amd64.config#L119

RobCoder commented 6 years ago

Yes, the issue is that changing the install path broke all existing Import statements.

RobCoder commented 6 years ago

FYI, you can adjust the import statements in your build files to look like this to compensate:

<Import Condition="Exists('$(MSBuildExtensionsPath)\ExtensionPack\4.0\MSBuild.ExtensionPack.tasks')" Project="$(MSBuildExtensionsPath)\ExtensionPack\4.0\MSBuild.ExtensionPack.tasks" />
<Import Condition="Exists('$(MSBuildExtensionsPath)\..\MSBuildExtensionPack\4.0\MSBuild.ExtensionPack.tasks')" Project="$(MSBuildExtensionsPath)\..\MSBuildExtensionPack\4.0\MSBuild.ExtensionPack.tasks" />

This will allow them to work with either version installed.