-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Update Cake packages to 0.16.0 #11
Conversation
Includes fixes for #1180 API change in module template
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need packages in the repository?
@devlead Yes, unfortunately. Even the docs point out that your only options are (since we're bundling multiple templates), packaging in MSI and storing on disk, or storing inside the VSIX. It is really annoying but NuGet support in VS extensibility is very patchy. I think there will be an alternative in future (should be possible to replace the default NuGet package wizard and bring the VS package manager in by MEF instead), but we decided that was a future avenue for improvement. That answer your question? |
@agc93 I was thinking about this GIT repo, couldn't we just restore them as part of build process? |
@devlead Ah, I get you now. Could be done, but we lose out of the box Visual Studio build then (since the project will be missing files on first clone), but that's probably not fatal. Obviously we would still need to be running against a specific version, but we do save having the actual |
If you have a project in solution that depends on the nuget and has 1st build priority then Visual Studio should auto restore those packages om first build. |
@devlead But none of the projects actually depend on the Cake packages, they're just included in the main project as content files, so that they're then packaged into the VSIX at a particular path. |
@agc93 Well you can treat them as development dependencies I was able to get it to compile by adding below to src/packages.config + <package id="Cake.Core" version="0.15.2" targetFramework="net451" developmentDependency="true" />
+ <package id="Cake.Testing" version="0.15.2" targetFramework="net451" developmentDependency="true" />
+ <package id="xunit" version="2.1.0" targetFramework="net451" developmentDependency="true" />
+ <package id="xunit.abstractions" version="2.0.1" targetFramework="net451" developmentDependency="true" />
+ <package id="xunit.assert" version="2.1.0" targetFramework="net451" developmentDependency="true" />
+ <package id="xunit.core" version="2.1.0" targetFramework="net451" developmentDependency="true" />
+ <package id="xunit.extensibility.core" version="2.1.0" targetFramework="net451" developmentDependency="true" />
+ <package id="xunit.extensibility.execution" version="2.1.0" targetFramework="net451" developmentDependency="true" />
+ <package id="xunit.runner.visualstudio" version="2.1.0" targetFramework="net451" developmentDependency="true" /> and changing src/Cake.VisualStudio.csproj to - <Content Include="Packages\cake.core.0.15.2.nupkg">
+ <Content Include="..\packages\Cake.Core.0.15.2\Cake.Core.0.15.2.nupkg">
- <Content Include="Packages\cake.testing.0.15.2.nupkg">
+ <Content Include="..\packages\Cake.Testing.0.15.2\Cake.Testing.0.15.2.nupkg">
- <Content Include="Packages\xunit.2.1.0.nupkg">
+ <Content Include="..\Packages\xunit.2.1.0\xunit.2.1.0.nupkg">
- <Content Include="Packages\xunit.runner.visualstudio.2.1.0.nupkg">
+ <Content Include="..\Packages\xunit.runner.visualstudio.2.1.0\xunit.runner.visualstudio.2.1.0.nupkg">
- <Content Include="Packages\xunit.abstractions.2.0.1.nupkg">
+ <Content Include="..\Packages\xunit.abstractions.2.0.1\xunit.abstractions.2.0.1.nupkg">
- <Content Include="Packages\xunit.assert.2.1.0.nupkg">
+ <Content Include="..\Packages\xunit.assert.2.1.0\xunit.assert.2.1.0.nupkg">
- <Content Include="Packages\xunit.core.2.1.0.nupkg">
+ <Content Include="..\Packages\xunit.core.2.1.0\xunit.core.2.1.0.nupkg">
- <Content Include="Packages\xunit.extensibility.core.2.1.0.nupkg">
+ <Content Include="..\Packages\xunit.extensibility.core.2.1.0\xunit.extensibility.core.2.1.0.nupkg">
- <Content Include="Packages\xunit.extensibility.execution.2.1.0.nupkg">
+ <Content Include="..\Packages\xunit.extensibility.execution.2.1.0\xunit.extensibility.execution.2.1.0.nupkg"> Then it just restores the packages on first compile, it's 20MB of binaries and as versions are kept in git repo could grow allot. So if at all possible I think we should investigate if it's possible to avoid unnecessary binaries in the repo. |
Okay I'll try out what you've described there and make sure the VSIX still gets built as expected |
Initial indications aren't looking good as configuring the package as you point out does build the project correctly, but the packages are now in the VSIX at a different relative path and I'm not sure I can control that part fully. I will keep looking into it tomorrow and over the weekend and see if I can come up with some method of achieving what we want. |
Why would we lose Visual Studio build working? Could we not hook up the task explorer and assign the restore task to the pre-build event? I think someone created an extension for that? |
@gep13 studio restores packages just fine, issue here it's that these packages are content not dependencies. But as restore works with my suggestion, we could potentially keep paths in csproj but have a prebuild action that copies the nupkgs from solution packages to project packages folder. Keeping same paths as when it worked. |
I've created #12 to address getting the packages out of the repo, so we can address that issue independently of getting the 0.16.0 changes put in, as it won't be a quick fix. |
Includes fixes for #1180 API change in module template (cc @patriksvensson )