Skip to content
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

Build in VS2022 fails #239

Closed
ngruson opened this issue Dec 21, 2021 · 4 comments
Closed

Build in VS2022 fails #239

ngruson opened this issue Dec 21, 2021 · 4 comments

Comments

@ngruson
Copy link

ngruson commented Dec 21, 2021

I'm migrating a database project from VS2019 to VS2022. In VS2019, I was using version 1.15.0 of MSBuild.Sdk.SqlProj.
In VS2022, I've changed the version to 2.0.0-beta.1 and the target framework to NET 6. When I build the project, I get the error The "CopyRefAssembly" task was not given a value for the required parameter "SourcePath".
Is this supposed to work within VS2022? I'm not sure.

The project file looks like this:

<Project Sdk="MSBuild.Sdk.SqlProj/2.0.0-beta.1">
  <PropertyGroup>
    <TargetFramework>net6.0</TargetFramework>
    <SqlServerVersion>Sql150</SqlServerVersion>
  </PropertyGroup>
  <ItemGroup>
    <Content Include="..\AW.Services.Customer.Database\**\Tables\*.sql" />
    <None Include="..\AW.Services.Customer.Database\**\Data\*.sql" />
    <PostDeploy Include="..\AW.Services.Customer.Database\**\Script.PostDeployment.sql" />
  </ItemGroup>
  <ItemGroup>
    <Content Remove="..\AW.Services.Customer.Database\obj\Debug\**" />
  </ItemGroup>
</Project>
@ErikEJ
Copy link
Collaborator

ErikEJ commented Dec 21, 2021

Try using netstandard2.0 instead.

@ngruson
Copy link
Author

ngruson commented Dec 21, 2021

Thanks Erik, I had been trying with netstandard2.1, but using netstandard2.0 it works.

@ngruson ngruson closed this as completed Dec 21, 2021
@jmezach
Copy link
Member

jmezach commented Dec 27, 2021

@ErikEJ @jeffrosenberg Perhaps we should add that warning as also suggested in #222 to lead users to the pit of success.

@ErikEJ
Copy link
Collaborator

ErikEJ commented Dec 27, 2021

Good idea!

IanKemp added a commit to IanKemp/MSBuild.Sdk.SqlProj that referenced this issue Mar 30, 2023
jmezach pushed a commit that referenced this issue Apr 3, 2023
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