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

Error while building .NETStandard PCL #888

Closed
matteobruni opened this issue Jun 29, 2016 · 10 comments
Closed

Error while building .NETStandard PCL #888

matteobruni opened this issue Jun 29, 2016 · 10 comments

Comments

@matteobruni
Copy link

Hello,

I have a solution with some PCL projects using .NETStandard target. With my Visual Studio 2015 (Update 3) they build without errors, but in AppVeyor I have an error about processor.

There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "dll path", "x86". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.

You can check the error here
This is a nuget package for all platforms so setting a specific CPU is not the right solution for me.

Thank you in advance.

@FeodorFitsner
Copy link
Member

Looks like it's building: https://ci.appveyor.com/project/FeodorFitsner/synology ?

@matteobruni
Copy link
Author

The broken branch is pcl, dev and master are ok

@FeodorFitsner
Copy link
Member

The error is reproducible locally on my machine. It's getting built in "Debug" configuration, but fails in "Release":

image

Indeed, "Release" has x86 set, while "Debug" has Any CPU:

image

@matteobruni
Copy link
Author

Ok thanks, that solution solved the issue. But now on packing nuget packages it gives me the warning:

Packing files from 'C:\projects\synology-c1jb9\Synology\bin\Release'.
Using 'Synology.nuspec' for metadata.
Successfully created package 'C:\Users\appveyor\AppData\Local\Temp\1\pi6cl4rvkn\Synology.0.2.56.0-beta.nupkg'.
WARNING: 1 issue(s) found with package 'Synology'.
Issue: Invalid framework folder.
Description: The folder 'portable50' under 'lib' is not recognized as a valid framework name or a supported culture identifier.
Solution: Rename it to a valid framework name.

But in my nuspec I use the netstandard1.3 platform

@FeodorFitsner
Copy link
Member

I'm getting the locally:

image

@matteobruni
Copy link
Author

The warning is the 1st one, but in my nuspec I have netstandard1.3 and not portable50, does it ignore that value?

@FeodorFitsner
Copy link
Member

I don't know. Might be a nuget issue.

I've tried nuget client v3.5.0-beta2 and got a different error:

image

@matteobruni
Copy link
Author

That error happens when the version in nuspec doesn't contain any alphabetic character, that's why -beta is in my branch

@FeodorFitsner
Copy link
Member

OK, got it working locally.

First thing - your AssemblyInfo.cs files do not include AssemblyInformationalVersion attributes and obviously a version with a -suffix cannot be put into AssemblyVersion attribute. Add AssemblyInformationalVersion attributes.

Second - you need the latest nuget 3.5.0-beta2. You can override the one installed on build workers during the build by simply downloading it to the current directory:

install:
- appveyor DownloadFile https://dist.nuget.org/win-x86-commandline/v3.5.0-beta2/NuGet.exe

Hope that helps.

@matteobruni
Copy link
Author

All solved, thank you!

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