Multi targets project build success on Windows but failed on travis-ci
See original GitHub issueI developed a project target on .netstandard1.6 and net45,I can build it successfully on my local windows and appveyor,but when I built via travis-ci,I met the error as follows:
/usr/share/dotnet/sdk/1.0.4/Microsoft.Common.CurrentVersion.targets(1111,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.5" were not found.
To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed.
Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies.
Therefore your assembly may not be correctly targeted for the framework you intend. [/home/travis/build/WeihanLi/MvcSimplePager/MvcSimplePager/MvcSimplePager.csproj]
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Build shows as successful even though the sole job failed
Hi folks. I have a build with a test that I've deliberately broken. Although the UI correctly reports the build as failed, the...
Read more >Erratic build failure without any error · Issue #8920 · travis- ...
The log looks perfectly fine, except for the last line "Done. Your build exited with 1." Other jobs in the same build succeeded...
Read more >Common Build Problems
One possible cause for builds failing unexpectedly can be calling set -e (also known as set errexit ), either directly in your .travis.yml...
Read more >Why does Travis CI report a build success even though ...
If script returns a non-zero exit code, the build is failed, but continues to run before being marked as failed.
Read more >Continuous integration for a .NET Core 3.0 project using ...
Now let's go to TravisCI logs and we will see that we successfully broke the project, because the integration test are failing and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@WeihanLi #335 covers building .NET Framework projects on non-Windows platforms.
If you don’t actually need the .NET Framework versions to be built when building on Linux, you could make the multi-targeting conditioned on what the current OS is. That’s what we do for the SDK tasks themselves: https://github.com/dotnet/sdk/blob/30baeae0a60f26214ffad743ddbbe4851375b4a2/src/Tasks/Microsoft.NET.Build.Tasks/Microsoft.NET.Build.Tasks.csproj#L7-L8
fyi I’ve summed up the current ways to build for net* on linux at https://stackoverflow.com/questions/44770702/build-nuget-package-on-linux-that-targets-net-framework/44773795#44773795