Skip to content

dotnet build is failing #8836

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

Closed
harshjain2 opened this issue Oct 27, 2017 · 3 comments
Closed

dotnet build is failing #8836

harshjain2 opened this issue Oct 27, 2017 · 3 comments

Comments

@harshjain2
Copy link
Contributor

Steps to reproduce

dotnet build is failing if Product Code targets netstandard1.4 and test project targets netcoreapp1.0/netcoreapp2.0.

  1. git clone https://github.com./microsoft/vstest
  2. git checkout 347c59f73943921786bf9d5a7e42d2cf011ddd15
  3. build.cmd -noloc

Expected behavior

  1. Build should complete successfully.

Actual behavior

  1. Getting errors like
C:\code\github\vstest\tools\dotnet\sdk\2.2.0-preview1-007460\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(165,5): error : Assets file 'C:\code\github\vstes
t\src\Microsoft.TestPlatform.Common\obj\project.assets.json' doesn't have a target for '.NETCoreApp,Version=v1.0'. Ensure that restore has run and that you have included 'netcoreapp1.0'
 in the TargetFrameworks for your project. [C:\code\github\vstest\src\Microsoft.TestPlatform.Common\Microsoft.TestPlatform.Common.csproj]
C:\code\github\vstest\tools\dotnet\sdk\2.2.0-preview1-007460\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(165,5): error : Assets file 'C:\code\github\vstes
t\src\Microsoft.TestPlatform.CommunicationUtilities\obj\project.assets.json' doesn't have a target for '.NETCoreApp,Version=v1.0'. Ensure that restore has run and that you have included
 'netcoreapp1.0' in the TargetFrameworks for your project. [C:\code\github\vstest\src\Microsoft.TestPlatform.CommunicationUtilities\Microsoft.TestPlatform.CommunicationUtilities.csproj]
C:\code\github\vstest\tools\dotnet\sdk\2.2.0-preview1-007460\Sdks\Microsoft.NET.Sdk\build\Microsoft.PackageDependencyResolution.targets(165,5): error : Assets file 'C:\code\github\vstes
t\src\Microsoft.TestPlatform.ObjectModel\obj\project.assets.json' doesn't have a target for '.NETCoreApp,Version=v1.0'. Ensure that restore has run and that you have included 'netcoreap
p1.0' in the TargetFrameworks for your project. [C:\code\github\vstest\src\Microsoft.TestPlatform.ObjectModel\Microsoft.TestPlatform.ObjectModel.csproj]

Environment data

Not working on this build
.NET Command Line Tools (2.2.0-preview1-007460)

Product Information:
Version: 2.2.0-preview1-007460
Commit SHA-1 hash: 173cc03

Runtime Environment:
OS Name: Windows
OS Version: 10.0.15063
OS Platform: Windows
RID: win10-x64
Base Path: C:\code\github\vstest\tools\dotnet\sdk\2.2.0-preview1-007460\

Microsoft .NET Core Shared Framework Host

Version : 2.1.0-preview1-25825-07
Build : 4c165c13bd390adf66f9af30a088d634d3f37a9d

Working on this build:
.NET Command Line Tools (2.1.0-preview1-007372)

Product Information:
Version: 2.1.0-preview1-007372
Commit SHA-1 hash: a1ecb3b

Runtime Environment:
OS Name: Windows
OS Version: 10.0.15063
OS Platform: Windows
RID: win10-x64
Base Path: C:\code\github\harshjain2\vstest\tools\dotnet\sdk\2.1.0-preview1-007372\

Microsoft .NET Core Shared Framework Host

Version : 2.1.0-preview1-25816-02
Build : c5006ff91f92e300b426eb26a9a0fa67192590b1

codito referenced this issue in microsoft/vstest Oct 27, 2017
HardCoded version of CLI to 2.1.0-preview1-007372 as the latest version has some issues.

Reverted to old version of CLI because of dotnet/cli#7921
@livarcocc
Copy link
Contributor

What sort of customization are you doing in your build? I just tried referencing netstandard1.4 library from a console app targeting netcoreapp1.0 and netcoreapp2.0.

So, getting some more insight into your build customizations might be helpful in being able to figure what is wrong here.

cc @dsplaisted who may have some insights here.

smadala referenced this issue in smadala/vstest Oct 30, 2017
HardCoded version of CLI to 2.1.0-preview1-007372 as the latest version has some issues.

Reverted to old version of CLI because of dotnet/cli#7921
smadala referenced this issue in microsoft/vstest Oct 30, 2017
* Object Model Api fix (#1231)

* Adding the missing property LocalExtensionData in TestCase

* Fixed the test.

* Do not crash data collector if a extension initialize fails. (#1230)

* Do not crash data collector if a extension initialize fails.

* Add unit tests for the scenario.

* Fix for changes in XPathNavigator for netcoreapp2.0 (#1226)

* Fix for changes in XPathNavigator in netcoreapp2.0
* Removed IXPathNavigable.

* Use TPv2 as default for .NET 3.5. (#1232)

* Loading native dll's correctly for UWP release mode (#1234)

* Loading native dll's correctly for UWP release mode

* nit's

* decouple process bitness with OS Architecture

* HardCoded version of CLI to 2.1.0-preview1-007372 (#1238)

HardCoded version of CLI to 2.1.0-preview1-007372 as the latest version has some issues.

Reverted to old version of CLI because of dotnet/cli#7921

* Added null check for parent node.

* Added conditional statements to support building against netcoreapp1.0

* Get OSArchitecture from Platform Abstraction to check for ARM Processor (#1242)

* GetOsArchitecture from Platform Abstraction to check for ARM

* making sure path is always small
smadala referenced this issue in smadala/vstest Oct 31, 2017
HardCoded version of CLI to 2.1.0-preview1-007372 as the latest version has some issues.

Reverted to old version of CLI because of dotnet/cli#7921
smadala referenced this issue in microsoft/vstest Oct 31, 2017
* Object Model Api fix (#1231)

* Adding the missing property LocalExtensionData in TestCase

* Fixed the test.

* Do not crash data collector if a extension initialize fails. (#1230)

* Do not crash data collector if a extension initialize fails.

* Add unit tests for the scenario.

* Use TPv2 as default for .NET 3.5. (#1232)

* Loading native dll's correctly for UWP release mode (#1234)

* Loading native dll's correctly for UWP release mode

* nit's

* decouple process bitness with OS Architecture

* HardCoded version of CLI to 2.1.0-preview1-007372 (#1238)

HardCoded version of CLI to 2.1.0-preview1-007372 as the latest version has some issues.

Reverted to old version of CLI because of dotnet/cli#7921

* Get OSArchitecture from Platform Abstraction to check for ARM Processor (#1242)

* GetOsArchitecture from Platform Abstraction to check for ARM

* making sure path is always small
@dsplaisted
Copy link
Member

With some help from @nguerrera, I've figured out what's wrong and filed dotnet/msbuild#2688 for this.

You can work around it by removing the duplicate project references. Specifically, remove the ProjectReference items from testHost.UnitTests.csproj which are also included in TestPlatform.Settings.targets.

@harshjain2
Copy link
Contributor Author

I will try the workaround and verify if build works.

@msftgits msftgits transferred this issue from dotnet/cli Jan 31, 2020
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

3 participants