Open gregpakes opened 5 years ago
Thanks! Some of these things are expected behavior, but we could definitely do a better job of improving errors and user experience.
dotnet build
can't build .sqlproj
, because the targets for doing so are distributed with VS instead of as an SDK or NuGet package.dotnet restore
can only restore for the projects that it can understand.nuget.exe restore
is subject to the same constraints as msbuild.exe
.Some things surprise me and need further investigation:
fyi @kathleendollard -- here's a (bad) early-adopter scenario story.
@rainersigwald how many of these things are in process for resolution? Do some need to be handed off to other teams?
This worked for me: `- task: DotNetCoreInstaller@0 displayName: 'Install .net core 3.0 (preview)' inputs: packageType: 'sdk' version: '3.0.100-preview6-012264' includePreviewVersions: true installationPath: $(Agent.ToolsDirectory)/dotnet
task: NuGetToolInstaller@0
task: NuGetCommand@2 inputs: restoreSolution: '$(solution)'
task: VSBuild@1 inputs: solution: '$(solution)' vsVersion: '16.0' msbuildArchitecture: 'x64' msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:DesktopBuildPackageLocation="$(build.artifactStagingDirectory)\WebApp.zip" /p:DeployIisAppPath="Default Web Site"' platform: '$(buildPlatform)' configuration: '$(buildConfiguration)'`
and the global.json
{ "sdk": { "version": "3.0.100-preview6-012264" } }
I have been asked to submit my issue here by @rainersigwald
Original Tweet: https://twitter.com/gregpakes/status/1122672235439804416
Background
I am porting a tiny WCF application to Asp.Net Core 3.0 Preview 4. After port, it is a a basic Asp.Net Core Web Api with a database project (sqlproj). Here are the issues I encountered:
dotnet build
doesn't work.UseDotNet@2
task to install .net core 3.0 preview. That was fine.dotnet build
would then give me this error:error MSB4019: The imported project "/opt/hostedtoolcache/dncs/3.0.100-preview4-011223/x64/sdk/3.0.100-preview4-011223/Microsoft/VisualStudio/v11.0/SSDT/Microsoft.Data.Tools.Schema.SqlTasks.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
Visual Studio Build Task
, I would get this error:and
dotnet restore
. Given I had a sqlproj file, the error messages were confusing.dotnet build
would give me this:error : This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\packages\MSTest.TestAdapter.2.0.0-beta4\build\net45\MSTest.TestAdapter.props.
dotnet restore
as the sqlproj has no dependencies.Error MSB4236: The SDK 'Microsoft.NET.Sdk.Web' specified could not be found.
error.x64
. Now the error message was:Apologies for the long rambling post. I'm sure a lot of this is due to my unfamiliarity with the new bits, but I was asked to post... so I hope it helps.