question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multi targets project build success on Windows but failed on travis-ci

See original GitHub issue

I 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:closed
  • Created 6 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
dsplaistedcommented, Jun 28, 2017

@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

0reactions
dasMullicommented, Jun 28, 2017
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found