-
-
Notifications
You must be signed in to change notification settings - Fork 427
Tooling migration #432
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
Tooling migration #432
Conversation
|
@josephwoodward |
|
Hmm, still really stuck with this error, anyone seen it before? Google's not showing much for it! |
|
@josephwoodward I work on the MSBuild team at Microsoft. Now that you're switching to the MSBuild-based projects and away from If the package is created during build, you won't need to run pack as a separate phase but if you do want to, you would now run |
|
Thanks a bunch @jeffkl, I'd missed that part! I'm still getting the SatelliteDllsProjectOutputGroupWithTargetFramework error so I'll keep digging. "C:\projects\shouldly\src\Shouldly.sln" (Build target) (1) ->
"C:\projects\shouldly\src\Shouldly\Shouldly.csproj" (default target) (2) ->
"C:\projects\shouldly\src\Shouldly\Shouldly.csproj" (SatelliteDllsProjectOutputGroupWithTargetFramework target) (2:5) ->
C:\projects\shouldly\src\Shouldly\Shouldly.csproj : error MSB4057: The target "SatelliteDllsProjectOutputGroupWithTargetFramework" does not exist in the project. |
|
Alright I checked out your branch and figured out what's wrong. You're using <Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MSBuildAllProjects>$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
</PropertyGroup>
<ImportGroup Condition=" '$(TargetFramework)' == '' AND '$(ExcludeRestorePackageImports)' != 'true' ">
<Import Project="$(NuGetPackageRoot)msbuild.sdk.extras\1.0.0\buildMultiTargeting\MSBuild.Sdk.Extras.targets" Condition="Exists('$(NuGetPackageRoot)msbuild.sdk.extras\1.0.0\buildMultiTargeting\MSBuild.Sdk.Extras.targets')" />
</ImportGroup>
<ImportGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' AND '$(ExcludeRestorePackageImports)' != 'true' ">
<Import Project="$(NuGetPackageRoot)msbuild.sdk.extras\1.0.0\build\netstandard1.0\MSBuild.Sdk.Extras.targets" Condition="Exists('$(NuGetPackageRoot)msbuild.sdk.extras\1.0.0\build\netstandard1.0\MSBuild.Sdk.Extras.targets')" />
</ImportGroup>
</Project>The initial build of a project with The package supports As a workaround, you can define an empty target in <Target Name="SatelliteDllsProjectOutputGroupWithTargetFramework" />
<Import Project="$(MSBuildSDKExtrasTargets)" Condition="Exists('$(MSBuildSDKExtrasTargets)')" /> |
clairernovotny
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would make a few changes based on what I've suggested
global.json
Outdated
| { | ||
| "projects": [ "src" ], | ||
| "sdk": { "version": "1.0.0-preview2-003131" } | ||
| "sdk": { "version": "1.0.0" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not use 1.0.0. Use 1.0.4 at the very least. Many bugs fixed.
NuGet.config
Outdated
| <!-- add key="CoreCLR Xunit" value="https://www.myget.org/F/coreclr-xunit/api/v3/index.json" / --> | ||
| <!-- add key="AspNet CI Feed" value="https://www.myget.org/F/aspnetcirelease/api/v3/index.json" /> --> | ||
| <add key="myget.org xunit" value="https://www.myget.org/F/xunit/api/v3/index.json" /> | ||
| <add key="myget.org msbuilsdkdextras" value="https://www.myget.org/F/msbuildsdkextras/api/v3/index.json" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for this. NuGet.org has the latest version.
| <TargetFramework>net452</TargetFramework> | ||
| <AssemblyName>Shouldly.Tests</AssemblyName> | ||
| <PackageId>Shouldly.Tests</PackageId> | ||
| <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is required
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0-preview-20170106-08" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd use either the stable version or the latest 15.3 preview test sdk version.
src/Shouldly/Shouldly.csproj
Outdated
| <PackageIconUrl>https://raw.github.com/shouldly/shouldly/master/Icons/package_icon.png</PackageIconUrl> | ||
| <PackageProjectUrl>http://shouldly.github.com</PackageProjectUrl> | ||
| <PackageLicenseUrl>https://github.com/shouldly/shouldly/blob/master/LICENSE.txt</PackageLicenseUrl> | ||
| <NetStandardImplicitPackageVersion Condition=" '$(TargetFramework)' == 'netstandard1.3' ">1.6.0</NetStandardImplicitPackageVersion> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't do this -- Remove this line and enable the default implicit ref or 1.6.1 for the netstandard 1.3 tfm. 1.6.0 contains many bugs, esp with Xamarin.
src/Shouldly/Shouldly.csproj
Outdated
| <IncludeSource>True</IncludeSource> | ||
|
|
||
| <ComVisible>false</ComVisible> | ||
| <IncludeProjectPriFile>false</IncludeProjectPriFile> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why you need this? There shouldn't be one generated anyway
src/Shouldly/Shouldly.csproj
Outdated
| <DefineConstants>$(DefineConstants);Async;Dynamic;NewReflection;ExpressionTrees</DefineConstants> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.3' "> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't do this....this is considered bad practice now. @terrajobst can explain in detail if you want. Remove this item group and leave the default netstandard.library 1.6.1 if the tfm is a netstandard one.
src/Shouldly/Shouldly.csproj
Outdated
| <PackageReference Include="System.Reflection.TypeExtensions" Version="4.3.0" /> | ||
| <PackageReference Include="System.Threading.Timer" Version="4.3.0" /> | ||
| <PackageReference Include="Microsoft.CSharp" Version="4.3.0" /> | ||
| <PackageReference Include="MSBuild.Sdk.Extras" Version="1.0.0" PrivateAssets="all" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why you need the sdk extras at all? It's really only needed to build project types other than net/netstandard/netcoreapp (like Xamarin, UWP, etc).
src/Shouldly/Shouldly.csproj
Outdated
| <PackageReference Include="MSBuild.Sdk.Extras" Version="1.0.0" PrivateAssets="all" /> | ||
| </ItemGroup> | ||
|
|
||
| <Import Project="$(MSBuildSDKExtrasTargets)" Condition="Exists('$(MSBuildSDKExtrasTargets)')" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be removed, the extras package shouldn't be needed here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I saw, this is a bug you hit in 15.2, should be fine in 15.2.2.
|
Also, with your |
|
Glad to help. I'll keep an eye on this PR. |
src/Shouldly/Shouldly.csproj
Outdated
| <PropertyGroup> | ||
| <Description>Shouldly - Assertion framework for .NET. The way asserting *Should* be</Description> | ||
| <TargetFrameworks>net451;netstandard1.3</TargetFrameworks> | ||
| <TargetFrameworks>net451;net452;netstandard1.3</TargetFrameworks> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a particular reason you need to support net451 and net452? there's virtually no API surface area different between them; in general, I suggest targeting the fewest frameworks you need to support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed, I presume this was temporary in an effort to troubleshoot the ci build.
@josephwoodward I've PRed a working build. If you are happy to merge it would be good to get some more eyes on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4188009 to
6b08b7a
Compare

Initial PR for project.json > .csproj migration