Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for unable to create portable class library projects in VS2015 & Dev15 #744

Merged
merged 1 commit into from Jul 11, 2016

Conversation

rohit21agrawal
Copy link
Contributor

@rohit21agrawal rohit21agrawal commented Jul 11, 2016

Fixes issue : NuGet/Home#3094

PCL projects template creating code calls into VsPackageInstaller.InstallPackagesFromRegistryRepository and passes isUnzipped = true which causes NuGet to assume the v2 version folder format while looking for packages at C:\Program Files (x86)\Microsoft SDKs\NuGetPackages

However, the SDK installs these packages in the v3 version folder format causing NuGet to throw an invalid operation exception

This fix involves removing the assumption of using the v2 version folder format when isUnzipped=true is passed. Instead it determines the actual feed type using the logic build in the FeedTypeUtility class.

CC: @emgarten @joelverhagen @alpaix @yishaigalatzer @rrelyea

@alpaix
Copy link
Contributor

alpaix commented Jul 11, 2016

:shipit:

@joelverhagen
Copy link
Member

Can you leave a comment about this change in behavior? Also, this still feels like a hack... do we have a work item to fix the installers and revert this change? Or do we intend on this being the functionality Forever?

@rohit21agrawal rohit21agrawal force-pushed the dev-ragrawal-pclprojects branch 3 times, most recently from fe931fd to 2e84092 Compare July 11, 2016 21:48
// HACK !!! : This is a hack for PCL projects which send isPreUnzipped = true, but their package source
// (located at C:\Program Files (x86)\Microsoft SDKs\NuGetPackages) follows the V3
// folder version format.
var isProjectJsonProject = await EnvDTEProjectUtility.HasBuildIntegratedConfig(project);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You only need this check if isPreUnzipped is true

@emgarten
Copy link
Member

Optimize the check, then :shipit:

@rohit21agrawal
Copy link
Contributor Author

@joelverhagen discussed this with @emgarten , it seems that there has been no change in behavior in the installer or the API calls . Since, Dev14 has already shipped , we will have to keep this hack forever in our code :( .

@rohit21agrawal rohit21agrawal merged commit eb89a13 into dev Jul 11, 2016
@rohit21agrawal rohit21agrawal deleted the dev-ragrawal-pclprojects branch July 11, 2016 22:56
@joelverhagen
Copy link
Member

thanks for the clarification @rohit21agrawal, LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants