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

Wrong paket ProjectRefences name causes incorrect packaging #1113

Closed
SavaNDragos opened this issue Oct 6, 2015 · 4 comments
Closed

Wrong paket ProjectRefences name causes incorrect packaging #1113

SavaNDragos opened this issue Oct 6, 2015 · 4 comments

Comments

@SavaNDragos
Copy link

I fond a pretty intereting issue when creating nuget packages:
In a proj file we can find the ProjectRefences (they resolve the dependencies between projects that are part of the same solution).
In case the project name we are refencing is different from the value that the projectreference has as a name, when paket creates the packages, it will do it wrong (it will include the assamblies for
referenced project also).
In the below example you can see ClassLibraryt.dll was included in the package because
ClassLibraryt is different from ClassLibrarytModified.csproj">

Example if we have:

{e6fef228-2b3b-451c-b7b6-1f309f24e2de}
ClassLibraryt

in our resulted packege we will have:
Mode LastWriteTime Length Name


----- 06/10/2015 10:30 4096 ClassLibraryt.dll
----- 06/10/2015 10:45 4608 ConsoleApplicationc.dll
----- 06/10/2015 10:45 11776 ConsoleApplicationc.pdb

Normally if we would have had

{e6fef228-2b3b-451c-b7b6-1f309f24e2de}
ClassLibrarytModified

the rsult would have been:
Mode LastWriteTime Length Name


----- 06/10/2015 10:31 4608 ConsoleApplicationc.dll
----- 06/10/2015 10:31 11776 ConsoleApplicationc.pdb

@SavaNDragos
Copy link
Author

ProjectReference Include="..\ClassLibraryt\ClassLibrarytModified.csproj"
  Project {e6fef228-2b3b-451c-b7b6-1f309f24e2de} Project
  Name ClassLibraryt Name
ProjectReference

ProjectReference Include="..\ClassLibraryt\ClassLibrarytModified.csproj"
  Project {e6fef228-2b3b-451c-b7b6-1f309f24e2de} Project
  Name ClassLibrarytModified Name

ProjectReference

@forki
Copy link
Member

forki commented Oct 6, 2015

I'm not sure I understand the issue. can you try to put this into a repro.zip?

@SavaNDragos
Copy link
Author

You should get it from https://github.com/SavaNDragos/Share

@SavaNDragos
Copy link
Author

Now if you run paket pack on this you will see 2 packages created, one of them (ConsoleApplicationc) will also contain the assamblies from the other one (which it is refered). The issues is caused because the ProjectReference Name is ClassLibraryt , but the project name ClassLibrarytModified (ClassLibrarytModified.csproj).
If you change the ProjectReference Name to ClassLibrarytModified in ConsoleApplicationc.csproj the packages will be published correctly (ConsoleApplicationc will no longer contain the asamblies for ClassLibrarytModified).

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

No branches or pull requests

2 participants