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

Major bug: Paket adds native references to .vcxproj file as if they are managed references (assemblies) #1658

Closed
konste opened this Issue May 3, 2016 · 11 comments

Comments

Projects
None yet
2 participants
@konste
Contributor

konste commented May 3, 2016

In paket.dependencies we have
framework: native
content: none
redirects: off
source https://www.nuget.org/api/v2/
nuget boost_date_time-vc140 1.60.0.0
nuget boost_filesystem-vc140 1.60.0.0
nuget boost_system-vc140 1.60.0.0

And in paket.references same packages also designated as native:
cpprestsdk.v140.winxp.msvcstl.static.rt-dyn framework: native
boost_filesystem-vc140 framework: native
boost_date_time-vc140 framework: native
boost_system-vc140 framework: native

When Packet Install executes it adds references to .vcxproj file, but does it like that:

<When Condition="'$(Platform)'=='Win32'">
      <ItemGroup>
        <Reference Include="boost_date_time-vc140-mt-1_60">
          <HintPath>..\..\packages\boost_date_time-vc140\lib\native\address-model-32\lib\boost_date_time-vc140-mt-1_60.dll</HintPath>
          <Private>True</Private>
          <Paket>True</Paket>
        </Reference>
        <Reference Include="boost_date_time-vc140-mt-gd-1_60">
          <HintPath>..\..\packages\boost_date_time-vc140\lib\native\address-model-32\lib\boost_date_time-vc140-mt-gd-1_60.dll</HintPath>
          <Private>True</Private>
          <Paket>True</Paket>
        </Reference>
      </ItemGroup>
    </When>

What is wrong in that fragment is that Reference element should instead be NativeReference or it confuses build system badly as it expect References to be proper .NET assemblies.

Should be relatively easy and straightforward fix, but it is blocking use from further development with Paket.

Konstantin

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki May 3, 2016

Member

Can you please come up with a small repro that has this issue and a csproj
that is fixed.

BTW: it's not a major bug it's just not really supported, yet. ;-) but I
will do my best to help you with that.
On May 3, 2016 9:55 PM, "Konstantin Erman" notifications@github.com wrote:

In paket.dependencies we have
framework: native
content: none
redirects: off
source https://www.nuget.org/api/v2/
nuget boost_date_time-vc140 1.60.0.0
nuget boost_filesystem-vc140 1.60.0.0
nuget boost_system-vc140 1.60.0.0

And in paket.references same packages also designated as native:
cpprestsdk.v140.winxp.msvcstl.static.rt-dyn framework: native
boost_filesystem-vc140 framework: native
boost_date_time-vc140 framework: native
boost_system-vc140 framework: native

When Packet Install executes it adds references to .vcxproj file, but does
it like that:

....\packages\boost_date_time-vc140\lib\native\address-model-32\lib\boost_date_time-vc140-mt-1_60.dll True True ....\packages\boost_date_time-vc140\lib\native\address-model-32\lib\boost_date_time-vc140-mt-gd-1_60.dll True True

What is wrong in that fragment is that Reference element should instead be
NativeReference or it confuses build system badly as it expect References
to be proper .NET assemblies.

Should be relatively easy and straightforward fix, but it is blocking use
from further development with Paket.

Konstantin


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#1658

Member

forki commented May 3, 2016

Can you please come up with a small repro that has this issue and a csproj
that is fixed.

BTW: it's not a major bug it's just not really supported, yet. ;-) but I
will do my best to help you with that.
On May 3, 2016 9:55 PM, "Konstantin Erman" notifications@github.com wrote:

In paket.dependencies we have
framework: native
content: none
redirects: off
source https://www.nuget.org/api/v2/
nuget boost_date_time-vc140 1.60.0.0
nuget boost_filesystem-vc140 1.60.0.0
nuget boost_system-vc140 1.60.0.0

And in paket.references same packages also designated as native:
cpprestsdk.v140.winxp.msvcstl.static.rt-dyn framework: native
boost_filesystem-vc140 framework: native
boost_date_time-vc140 framework: native
boost_system-vc140 framework: native

When Packet Install executes it adds references to .vcxproj file, but does
it like that:

....\packages\boost_date_time-vc140\lib\native\address-model-32\lib\boost_date_time-vc140-mt-1_60.dll True True ....\packages\boost_date_time-vc140\lib\native\address-model-32\lib\boost_date_time-vc140-mt-gd-1_60.dll True True

What is wrong in that fragment is that Reference element should instead be
NativeReference or it confuses build system badly as it expect References
to be proper .NET assemblies.

Should be relatively easy and straightforward fix, but it is blocking use
from further development with Paket.

Konstantin


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#1658

@konste

This comment has been minimized.

Show comment
Hide comment
@konste

konste May 3, 2016

Contributor

Ok, working on it.

From: Steffen Forkmann [mailto:notifications@github.com]
Sent: Tuesday, May 3, 2016 2:08 PM
To: fsprojects/Paket Paket@noreply.github.com
Cc: Konstantin Erman konste@ermank.com; Author author@noreply.github.com
Subject: Re: [fsprojects/Paket] Major bug: Paket adds native references to .vcxproj file as if they are managed references (assemblies) (#1658)

Can you please come up with a small repro that has this issue and a csproj
that is fixed.

BTW: it's not a major bug it's just not really supported, yet. ;-) but I
will do my best to help you with that.
On May 3, 2016 9:55 PM, "Konstantin Erman" <notifications@github.commailto:notifications@github.com> wrote:

In paket.dependencies we have
framework: native
content: none
redirects: off
source https://www.nuget.org/api/v2/
nuget boost_date_time-vc140 1.60.0.0
nuget boost_filesystem-vc140 1.60.0.0
nuget boost_system-vc140 1.60.0.0

And in paket.references same packages also designated as native:
cpprestsdk.v140.winxp.msvcstl.static.rt-dyn framework: native
boost_filesystem-vc140 framework: native
boost_date_time-vc140 framework: native
boost_system-vc140 framework: native

When Packet Install executes it adds references to .vcxproj file, but does
it like that:

....\packages\boost_date_time-vc140\lib\native\address-model-32\lib\boost_date_time-vc140-mt-1_60.dll True True ....\packages\boost_date_time-vc140\lib\native\address-model-32\lib\boost_date_time-vc140-mt-gd-1_60.dll True True

What is wrong in that fragment is that Reference element should instead be
NativeReference or it confuses build system badly as it expect References
to be proper .NET assemblies.

Should be relatively easy and straightforward fix, but it is blocking use
from further development with Paket.

Konstantin


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#1658


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHubhttps://github.com/fsprojects/Paket/issues/1658#issuecomment-216664912

Contributor

konste commented May 3, 2016

Ok, working on it.

From: Steffen Forkmann [mailto:notifications@github.com]
Sent: Tuesday, May 3, 2016 2:08 PM
To: fsprojects/Paket Paket@noreply.github.com
Cc: Konstantin Erman konste@ermank.com; Author author@noreply.github.com
Subject: Re: [fsprojects/Paket] Major bug: Paket adds native references to .vcxproj file as if they are managed references (assemblies) (#1658)

Can you please come up with a small repro that has this issue and a csproj
that is fixed.

BTW: it's not a major bug it's just not really supported, yet. ;-) but I
will do my best to help you with that.
On May 3, 2016 9:55 PM, "Konstantin Erman" <notifications@github.commailto:notifications@github.com> wrote:

In paket.dependencies we have
framework: native
content: none
redirects: off
source https://www.nuget.org/api/v2/
nuget boost_date_time-vc140 1.60.0.0
nuget boost_filesystem-vc140 1.60.0.0
nuget boost_system-vc140 1.60.0.0

And in paket.references same packages also designated as native:
cpprestsdk.v140.winxp.msvcstl.static.rt-dyn framework: native
boost_filesystem-vc140 framework: native
boost_date_time-vc140 framework: native
boost_system-vc140 framework: native

When Packet Install executes it adds references to .vcxproj file, but does
it like that:

....\packages\boost_date_time-vc140\lib\native\address-model-32\lib\boost_date_time-vc140-mt-1_60.dll True True ....\packages\boost_date_time-vc140\lib\native\address-model-32\lib\boost_date_time-vc140-mt-gd-1_60.dll True True

What is wrong in that fragment is that Reference element should instead be
NativeReference or it confuses build system badly as it expect References
to be proper .NET assemblies.

Should be relatively easy and straightforward fix, but it is blocking use
from further development with Paket.

Konstantin


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#1658


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHubhttps://github.com/fsprojects/Paket/issues/1658#issuecomment-216664912

@konste

This comment has been minimized.

Show comment
Hide comment
@konste

konste May 3, 2016

Contributor

Trivial example is here: https://goo.gl/5Uxjjx
It is empty C++ project with a couple boost packages added with Paket.
When you build it you get warnings
1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5): warning MSB3246: Resolved file has a bad image, no metadata, or is otherwise inaccessible. Could not load file or assembly 'boost_filesystem-vc140-mt-1_60.dll' or one of its dependencies. The module was expected to contain an assembly manifest.
That's exactly because Paket used Reference instead of NativeReference for native er-r... reference :)

Contributor

konste commented May 3, 2016

Trivial example is here: https://goo.gl/5Uxjjx
It is empty C++ project with a couple boost packages added with Paket.
When you build it you get warnings
1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(1820,5): warning MSB3246: Resolved file has a bad image, no metadata, or is otherwise inaccessible. Could not load file or assembly 'boost_filesystem-vc140-mt-1_60.dll' or one of its dependencies. The module was expected to contain an assembly manifest.
That's exactly because Paket used Reference instead of NativeReference for native er-r... reference :)

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki May 4, 2016

Member

image

does this look correct?

Member

forki commented May 4, 2016

image

does this look correct?

@konste

This comment has been minimized.

Show comment
Hide comment
@konste

konste May 4, 2016

Contributor

If it compiles - it is probably fine! Frankly I also don't have a ton of experience with native NuGet packages. Playing by the ear. :)

Contributor

konste commented May 4, 2016

If it compiles - it is probably fine! Frankly I also don't have a ton of experience with native NuGet packages. Playing by the ear. :)

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki May 4, 2016

Member

I don't know if it compiles - I'm missing some C++ build tools. I will just release this in v3 channel so you can test.

Member

forki commented May 4, 2016

I don't know if it compiles - I'm missing some C++ build tools. I will just release this in v3 channel so you can test.

@konste

This comment has been minimized.

Show comment
Hide comment
@konste

konste May 4, 2016

Contributor

Is there a build for me to try?

Contributor

konste commented May 4, 2016

Is there a build for me to try?

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki May 4, 2016

Member

I wish. Deutsche Telekom killed my Internet and tethering did not work...

I will let you know
On May 4, 2016 19:11, "Konstantin Erman" notifications@github.com wrote:

Is there a build for me to try?


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#1658 (comment)

Member

forki commented May 4, 2016

I wish. Deutsche Telekom killed my Internet and tethering did not work...

I will let you know
On May 4, 2016 19:11, "Konstantin Erman" notifications@github.com wrote:

Is there a build for me to try?


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#1658 (comment)

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki May 4, 2016

Member

push succeeded please test latest paket 3.0 beta version. thx

Member

forki commented May 4, 2016

push succeeded please test latest paket 3.0 beta version. thx

@konste

This comment has been minimized.

Show comment
Hide comment
@konste

konste May 4, 2016

Contributor

It does the right thing, but I cannot test it beyond the very first project, because #1657 is in the way. I have provided a small repro for that issue.

Contributor

konste commented May 4, 2016

It does the right thing, but I cannot test it beyond the very first project, because #1657 is in the way. I have provided a small repro for that issue.

@forki

This comment has been minimized.

Show comment
Hide comment
@forki

forki May 4, 2016

Member

yeah. hopefully I can take a look tomorrow. Developing a package manager without good internet connection is no fun.

Member

forki commented May 4, 2016

yeah. hopefully I can take a look tomorrow. Developing a package manager without good internet connection is no fun.

@forki forki closed this in dcdcd46 May 5, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment