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

Visual studio professional 2022 MSBuild gives less warnings then Visual studio build tools 2022 #13272

Closed
MatthijsPrent opened this issue Jun 10, 2022 · 3 comments
Labels

Comments

@MatthijsPrent
Copy link

Repro steps

Provide the steps required to reproduce the problem:

  1. Build the solution via the cmd using the MSBuild.exe that was provided with VS pro 2022.
  2. Build the solution via de cmd using the MSBuild.exe that was provided with VS build tools 2022.

Expected behavior

I would expect the result to be equal, and the warning messages to be the same.

Actual behavior

With the build tools version of VS build tools 2022, more warnings are shown then with the VS pro 2022. For example FS3570 is shown using the Build tools, but not using visual studio in the following code:
image

Known workarounds

None

Related information

  • Windows 11
  • Visual studio professional 2022 17.2.3
  • Visual studio Build Tools 2022 17.3.0. preview 1.1
  • Microsoft.NET.Sdk
  • net48
@vzarytovskii
Copy link
Member

Build tools seem to be newer, we need to check when we introduced this warning by default as well as make sure it behaves as expected on the same version of VS and build tools.

@KevinRansom
Copy link
Member

KevinRansom commented Jun 10, 2022

The information warning was added in F# 6.0, which was first delivered in VS2022.0 so both compilers should definitely produce the same output.

Indeed I do see the same output from one that I built, on both build tools preview 1.1 and VS Enterprise 17.2.3.
Is it possible that on one of the builds you forgot to add a /t:rebuild to ensure that it actually rebuilds the project.

please note that this is the Build Tools install, you can tell because it still points to the 32 bit version of program files.

**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.3.0-pre.1.1
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************

C:\Program Files (x86)\Microsoft Visual Studio\2022\Preview>cd \temp\test

C:\temp\test>msbuild /t:rebuild
Microsoft (R) Build Engine version 17.3.0-preview-22226-03+b6fc583d4 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 6/10/2022 9:59:21 AM.
Project "C:\temp\test\test.fsproj" on node 1 (rebuild target(s)).
_CheckForNETCoreSdkIsPreview:
C:\Program Files\dotnet\sdk\7.0.100-preview.5.22307.18\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(219,5): message NETSDK1057: You are using a preview version
of .NET. See: https://aka.ms/dotnet-support-policy [C:\temp\test\test.fsproj]
CoreClean:

.... whole bunch of spew elided ...

  C:\temp\test\Program.fs(5,20): info FS3370: The use of '!' from the F# library is deprecated. See https://aka.ms/fsharp-refcell-ops. For example, please change '!cell' to 'cell.Value'.

  C:\temp\test\Program.fs(7,6): info FS3370: The use of ':=' from the F# library is deprecated. See https://aka.ms/fsharp-refcell-ops. For example, please change 'cell := expr' to 'cell.Value <-
  expr'.

  C:\temp\test\Program.fs(9,22): info FS3370: The use of '!' from the F# library is deprecated. See https://aka.ms/fsharp-refcell-ops. For example, please change '!cell' to 'cell.Value'.

.... whole bunch of spew elided ...

Done Building Project "C:\temp\test\test.fsproj" (rebuild target(s)).


Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:01.06
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.2.3
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************

C:\Program Files\Microsoft Visual Studio\2022\Enterprise>cd \temp\test

C:\temp\test>msbuild /t:rebuild
Microsoft (R) Build Engine version 17.2.1+52cd2da31 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 6/10/2022 10:02:06 AM.
Project "C:\temp\test\test.fsproj" on node 1 (rebuild target(s)).

.... whole bunch of spew elided ...

  C:\temp\test\Program.fs(5,20): info FS3370: The use of '!' from the F# library is deprecated. See https://aka.ms/fsharp-refcell-ops. For example, please change '!cell' to 'cell.Value'.

  C:\temp\test\Program.fs(7,6): info FS3370: The use of ':=' from the F# library is deprecated. See https://aka.ms/fsharp-refcell-ops. For example, please change 'cell := expr' to 'cell.Value <-
  expr'.

  C:\temp\test\Program.fs(9,22): info FS3370: The use of '!' from the F# library is deprecated. See https://aka.ms/fsharp-refcell-ops. For example, please change '!cell' to 'cell.Value'.

.... whole bunch of spew elided ...

Done Building Project "C:\temp\test\test.fsproj" (rebuild target(s)).


Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:01.08

If you are still seeing this we can dig in further, please build with the /bl option for each vs install and attach the msbuild.binlog file, and we can investigate further.

I hope this helps

Kevin

@KevinRansom
Copy link
Member

Thanks for reporting this
I checked with the buildtools now up on visualstudio.com, it produces the correct diagnostic output.

closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

3 participants