Azure DevOps msbuild failing when building wapproj - c#

I have a project using .net core 3.1 with Windows Forms and a Windows Application Packaging project in the same solution. I had this pipeline working for the past couple of months and now it seems to have stopped working.
I'm not sure, but it seems to be failing to find a .target file from within the hosted agent I'm using to run the pipeline.
I tried using the VS Msbuild step and the MSBuild standalone one, also tried specific NuGet versions(5.2.0,5.8.0,5.10.0) with Nuget Restore step. But nothing seems to help.
Does anyone have some clue where to start looking?
The error:
...
CopyFilesToOutputDirectory:
Copying file from "D:\a\1\s\PrinterAgent\PrinterAgent\obj\Release\netcoreapp3.1\PrinterAgent.dll" to "D:\a\1\s\PrinterAgent\PrinterAgent\bin\Release\netcoreapp3.1\PrinterAgent.dll".
PrinterAgent -> D:\a\1\s\PrinterAgent\PrinterAgent\bin\Release\netcoreapp3.1\PrinterAgent.dll
Copying file from "D:\a\1\s\PrinterAgent\PrinterAgent\obj\Release\netcoreapp3.1\PrinterAgent.pdb" to "D:\a\1\s\PrinterAgent\PrinterAgent\bin\Release\netcoreapp3.1\PrinterAgent.pdb".
Done Building Project "D:\a\1\s\PrinterAgent\PrinterAgent\PrinterAgent.csproj" (default targets).
##[error]C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\DesktopBridge\Microsoft.DesktopBridge.targets(16,3): Error MSB4019: The imported project "C:\hostedtoolcache\windows\dotnet\sdk\3.1.411\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.NuGet.targets" was not found. Confirm that the expression in the Import declaration "C:\hostedtoolcache\windows\dotnet\sdk\3.1.411\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.NuGet.targets" is correct, and that the file exists on disk.
Project "D:\a\1\s\PrinterAgent\PrinterAgent.sln" (1) is building "D:\a\1\s\PrinterAgent\PrinterAgent.Package\PrinterAgent.Package.wapproj" (3) on node 1 (default targets).
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\DesktopBridge\Microsoft.DesktopBridge.targets(16,3): error MSB4019: The imported project "C:\hostedtoolcache\windows\dotnet\sdk\3.1.411\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.NuGet.targets" was not found. Confirm that the expression in the Import declaration "C:\hostedtoolcache\windows\dotnet\sdk\3.1.411\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.NuGet.targets" is correct, and that the file exists on disk. [D:\a\1\s\PrinterAgent\PrinterAgent.Package\PrinterAgent.Package.wapproj]
Done Building Project "D:\a\1\s\PrinterAgent\PrinterAgent.Package\PrinterAgent.Package.wapproj" (default targets) -- FAILED.
Done Building Project "D:\a\1\s\PrinterAgent\PrinterAgent.sln" (default targets) -- FAILED.
Build FAILED.
"D:\a\1\s\PrinterAgent\PrinterAgent.sln" (default target) (1) ->
"D:\a\1\s\PrinterAgent\PrinterAgent.Package\PrinterAgent.Package.wapproj" (default target) (3) ->
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\DesktopBridge\Microsoft.DesktopBridge.targets(16,3): error MSB4019: The imported project "C:\hostedtoolcache\windows\dotnet\sdk\3.1.411\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.NuGet.targets" was not found. Confirm that the expression in the Import declaration "C:\hostedtoolcache\windows\dotnet\sdk\3.1.411\Sdks\Microsoft.NET.Sdk\Sdk\Sdk.NuGet.targets" is correct, and that the file exists on disk. [D:\a\1\s\PrinterAgent\PrinterAgent.Package\PrinterAgent.Package.wapproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:07.08
##[error]Process 'msbuild.exe' exited with code '1'.
Pipeline Definition:
Using windows-2019 agent
pool:
name: Azure Pipelines
demands:
- msbuild
- azureps
#Your build pipeline references the ‘packageName’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
#Your build pipeline references the ‘packageName’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
#Your build pipeline references the ‘BuildPlatform’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
#Your build pipeline references the ‘BuildConfiguration’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
#Your build pipeline references the ‘msixInstallUrl’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
#Your build pipeline references an undefined variable named ‘signingCert.password’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab. See https://go.microsoft.com/fwlink/?linkid=865972
#Your build pipeline references an undefined variable named ‘mySecureFile.secureFilePath’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab. See https://go.microsoft.com/fwlink/?linkid=865972
variables:
packageVersion: '1.0.0'
steps:
- task: UseDotNet#2
displayName: 'Use .NET Core sdk 3.1.411'
inputs:
version: 3.1.411
- powershell: |
[xml]$manifest= get-content ".\PrinterAgent\PrinterAgent.Package\Package.appxmanifest"
$manifest.Package.Identity.Version = "$(packageVersion).$(Build.BuildId)"
$manifest.Package.Identity.Name = "demo-864d9095-955f-4d3c-adb0-6574a5acb88b"
$manifest.Package.Properties.DisplayName = "$(packageName)"
$manifest.Package.Applications.Application.VisualElements.DisplayName = "$(packageName)"
$manifest.save(".\PrinterAgent\PrinterAgent.Package\Package.appxmanifest")
displayName: 'PowerShell Script'
- task: DotNetCoreCLI#2
displayName: 'dotnet restore'
inputs:
command: restore
projects: '**/*.csproj'
- task: DownloadSecureFile#1
displayName: 'Download secure file'
inputs:
secureFile: <fileId>
#Fails here
- task: MSBuild#1
displayName: 'Build solution **/*.sln'
inputs:
msbuildVersion: 16.0
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
msbuildArguments: '/p:AppInstallerUri=$(msixInstallUrl) /p:AppxPackageDir="$(Build.ArtifactStagingDirectory)" /p:UapAppxPackageBuildMode=SideLoadOnly /p:GenerateAppInstallerFile=true /p:PackageCertificatePassword="$(signingCert.password)" /p:PackageCertificateKeyFile="$(mySecureFile.secureFilePath)" /p:AppInstallerCheckForUpdateFrequency=OnApplicationRun /p:AppInstallerUpdateFrequency=1 /p:AppInstallerShowPrompt=true'
- task: PublishBuildArtifacts#1
displayName: 'Publish Artifact: drop'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'
condition: succeededOrFailed()
- task: AzureCLI#2
displayName: 'Azure CLI CleanUp blob'
inputs:
azureSubscription: <azureSubscription>
scriptType: ps
scriptLocation: inlineScript
inlineScript: 'az storage blob delete-batch --account-name <storage> --source ''$web'''
- task: AzureFileCopy#4
displayName: 'AzureBlob File Copy'
inputs:
SourcePath: '$(build.artifactstagingdirectory)/*'
azureSubscription: <azureSubscription>
Destination: AzureBlob
storage: <storageName>
ContainerName: '$web'

I finally fixed it myself.
You need the latest .NET SDK to get rid of MSB4019:
- task: UseDotNet#2
displayName: 'Use .NET Core sdk 3.1.x'
inputs:
version: 3.1.x
This will introduce another issue (NETSDK1004, see my comments), that can be fixed by restoring the packaging project explicitly, but that requires msbuild, try something like:
- task: MSBuild#1
inputs:
solution: PrinterAgent.Package\PrinterAgent.Package.wapproj
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
msbuildArguments: '/t:restore'
You might also try to modify the existing msbuildArguments by adding: /t:restore;build

Related

Azure Pipeline of C# and .Net is creating extra folder

I have a DevOps team and have very less experience with C# and .NET.
I have code written by dev team.
This is the folder structure of the project:
Now when I built the software using visual studio community edition. It creates this folder structure.
Global.asax
Web.config
app_data
bin
Properties
But when i am running the build via Azure Devops Pipeline, then folder structure is changed.
- task: NuGetToolInstaller#1
displayName: Installing nuget
- task: NuGetCommand#2
displayName: nuget restore
inputs:
command: 'restore'
restoreSolution: '**/*.sln'
feedsToUse: config
nugetConfigPath: NuGet.config
- task: VSBuild#1
inputs:
solution: '**\*.sln'
msbuildArgs: '/p:OutDir=$(Build.ArtifactStagingDirectory)'
createLogFile: true
logFileVerbosity: diagnostic
name: BulidingSolutionTask
- task: PublishBuildArtifacts#1
displayName: 'Publish Build Artifacts'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
ArtifactName: 'drop'
publishLocation: 'Container'
Below is folder structure.
_PublishedWebsites/Mainproject/Global.asax
_PublishedWebsites/Mainproject/Properties
_PublishedWebsites/Mainproject/Web.config
_PublishedWebsites/Mainproject/bin
_PublishedWebsites/webjob1/bin/FileSandDirecotriesOfWebJob
_PublishedWebsites/webjob2/bin/FileSandDirecotriesOfWebJob
Why am I getting extra folder created _PublishedWebsites/Mainproject and why Webjob1 and 2 has bin folder inside? Is it a development problem or build problem and how to fix it?
Your first screenshot is the structure of the "solution" in .NET, which is where your SLN file lives. Your second screenshot is of your "project" in .NET, which is where your CSPROJ file lives. If you only want to build the project but not the solution you would want to specify that in your DevOps tasks as **/XYZ.csproj (where "XYZ" is the name of the CSPROJ file in the Mainproject folder) rather then building the entire solution, which likely houses those other projects that you're getting in your build output.
Alternatively, you could leave the SLN build, and then use the following build args:
msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactStagingDirectory)"'
And then simply this for your publish:
- publish: '$(Build.ArtifactStagingDirectory)'
artifact: drop
This will put your individual projects into ZIP files that can then be deployed independently (i.e. if you were to want to deploy webjob1 or webjob2 later, you would have that option in your release pipeline).

error MSB1003: Specify a project or solution file. building a pipeline with azure and can't find csproj file

Hi I've got a solution that has multiple projects held within it where I'm hoping to automate the build and deployment of the webapplication within the project.
on my HD the dir looks like C:\Users\mleip\source\repos\edocs.utils.bluebeam-api\edocs.utils.bluebeam-api.Caller\edocs.utils.CDEComms , however, when I run the below yaml
i get
MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
variables:
buildConfiguration: 'Release'
steps:
- script: dotnet restore
- powershell: |
Write-Host "Your parameter is now: $env:Param"
Write-Host "When outputting standard variable build id: $(Build.BuildId)"
Write-Host "When outputting standard variable build id via env: $env:BuildNumber"
Write-Host "The repo name is: $(Build.Repository.Name)"
Write-Host "The build definition name is: $(Build.DefinitionName)"
- script: dotnet build --configuration $(buildConfiguration)
displayName: 'dotnet build $(buildConfiguration)'
- task: DotNetCoreCLI#2
inputs:
command: 'build'
projects: '**/edocs.utils.bluebeam-api.Caller/edocs.utils.CDEComms/edocs.utils.CDEComms.csproj'
So far I have tried several combinations of dir for where azure should locate the build file, however, each time it fails. The solution has several projects within it. CDEComms is the only project within that folder so I'm left quite confused as to what's going on.
I'm quite new to building pipelines and any help as to why this is failing would be greatly appreciated.
In order to narrow down the issue, try to simply specify **/*.csproj in the YAML file to check the build result. And set variable system.debug to True, to check whether the path is correct in C:\hostedtoolcache\windows\dotnet\dotnet.exe build {path}. Also, clone the repo to your local machine to run build it locally, to check the result.
From the description you have provided, you will first have to push your code/solution i.e. the content of your C:\ drive to your repository.

Azure DevOps Pipeline fail build as it can create folder to write the XML documentation file

I have a .NET 3.1 web api project with swaggerUI. During the Publish of this project I've set that it must generate the XML documentation so Swagger can show the comments I've inserted for each endpoint, objects returned, etc...
Then I've created a pipeline in Azure DevOps to automatically run the build on trigger changes on the master branch, but I get the following error:
Determining projects to restore...
Restored D:\a\1\s\XXX-DataBridges-API\XXX-DataBridges-API.csproj (in 48.44 sec).
C:\Program Files\dotnet\sdk\5.0.102\Microsoft.Common.CurrentVersion.targets(1129,5): warning MSB3191: Unable to create directory "E:\Progetti\XXX\Xyz-MyProjectName-PublicAPI\XXX-DataBridges-API\". Could not find a part of the path 'E:\Progetti\XXX\Xyz-MyProjectName-PublicAPI\XXX-DataBridges-API\'. [D:\a\1\s\XXX-DataBridges-API\XXX-DataBridges-API.csproj]
C:\Program Files\dotnet\sdk\5.0.102\Microsoft.Common.CurrentVersion.targets(1129,5): warning MSB4181: The "MakeDir" task returned false but did not log an error. [D:\a\1\s\XXX-DataBridges-API\XXX-DataBridges-API.csproj]
D:\a\1\s\XXX-DataBridges-API\Models\Context\ReportingContext.cs(58,10): warning CS1030: #warning: 'To protect potentially sensitive information in your connection string, you should move it out of source code. See http://go.microsoft.com/fwlink/?LinkId=723263 for guidance on storing connection strings.' [D:\a\1\s\XXX-DataBridges-API\XXX-DataBridges-API.csproj]
CSC : error CS0016: Could not write to output file 'E:\Progetti\XXX\Xyz-MyProjectName-PublicAPI\XXX-DataBridges-API\XXX-DataBridges-API.xml' -- 'Could not find a part of the path 'E:\Progetti\XXX\Xyz-MyProjectName-PublicAPI\XXX-DataBridges-API\XXX-DataBridges-API.xml'.' [D:\a\1\s\XXX-DataBridges-API\XXX-DataBridges-API.csproj]
Build FAILED.
C:\Program Files\dotnet\sdk\5.0.102\Microsoft.Common.CurrentVersion.targets(1129,5): warning MSB3191: Unable to create directory "E:\Progetti\XXX\Xyz-MyProjectName-PublicAPI\XXX-DataBridges-API\". Could not find a part of the path 'E:\Progetti\XXX\Xyz-MyProjectName-PublicAPI\XXX-DataBridges-API\'. [D:\a\1\s\XXX-DataBridges-API\XXX-DataBridges-API.csproj]
C:\Program Files\dotnet\sdk\5.0.102\Microsoft.Common.CurrentVersion.targets(1129,5): warning MSB4181: The "MakeDir" task returned false but did not log an error. [D:\a\1\s\XXX-DataBridges-API\XXX-DataBridges-API.csproj]
D:\a\1\s\XXX-DataBridges-API\Models\Context\ReportingContext.cs(58,10): warning CS1030: #warning: 'To protect potentially sensitive information in your connection string, you should move it out of source code. See http://go.microsoft.com/fwlink/?LinkId=723263 for guidance on storing connection strings.' [D:\a\1\s\XXX-DataBridges-API\XXX-DataBridges-API.csproj]
CSC : error CS0016: Could not write to output file 'E:\Progetti\XXX\Xyz-MyProjectName-PublicAPI\XXX-DataBridges-API\XXX-DataBridges-API.xml' -- 'Could not find a part of the path 'E:\Progetti\XXX\Xyz-MyProjectName-PublicAPI\XXX-DataBridges-API\XXX-DataBridges-API.xml'.' [D:\a\1\s\XXX-DataBridges-API\XXX-DataBridges-API.csproj]
3 Warning(s)
1 Error(s)
I also see in the error message that it talks about .Net 5, "C:\Program Files\dotnet\sdk\5.0.102..." but I've specified that is Net Core 3.1.
Here is the YAML:
trigger:
- master
pool:
vmImage: 'windows-2019'
variables:
buildConfiguration: 'Release'
steps:
- script: dotnet build --configuration $(buildConfiguration)
displayName: 'dotnet build'
- task: DotNetCoreCLI#2
inputs:
command: 'publish'
publishWebProjects: true
zipAfterPublish: true
arguments: '--output $(build.artifactstagingdirectory)'
- task: PublishBuildArtifacts#1
inputs:
pathToPublish: $(Build.ArtifactStagingDirectory)
artifactName: MyProject_Build
Solved by modifying the path of the documentfile section in .csproj file.
setting as ".\documentation-file-name.xml" solved the error

Azure build pipeline NuGet Restore error NETSDK1045

I created an Azure CI pipeline through Visual Studio 2019. The project target framework is .net core 3.1. However, during the NuGet Restore it fails.
I have .Net Core 2.2.2017 and 3.1.101 installed on my computer and my Visual Studio 2019 community version is 16.4. My environment variables paths are in place.
I also tried creating an app service manually that uses .net core 3.1 LTS stack but I still get the same error.
##[error]The nuget command failed with exit code(1) and error(C:\Program Files\dotnet\sdk\2.2.110\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(137,5):
error NETSDK1045: The current .NET SDK does not support targeting .NET Core 3.1. Either target .NET Core 2.2 or lower, or use a version of the .NET SDK that supports .NET Core 3.1.
This is the YAML file generated by Visual Studio
pool:
name: Hosted VS2017
demands:
- msbuild
- visualstudio
- vstest
steps:
- task: NuGetToolInstaller#1
displayName: 'Use NuGet 5.0.0'
inputs:
versionSpec: 5.0.0
- task: NuGetCommand#2
displayName: 'NuGet restore'
inputs:
restoreSolution: '$(Parameters.solution)'
- task: VSBuild#1
displayName: 'Build solution'
inputs:
solution: '$(Parameters.solution)'
msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactstagingdirectory)\\"'
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
- task: VSTest#2
displayName: 'Test Assemblies'
inputs:
testAssemblyVer2: |
**\$(BuildConfiguration)\*test*.dll
!**\obj\**
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
- task: PublishSymbols#1
displayName: 'Publish symbols path'
inputs:
SearchPattern: '**\bin\**\*.pdb'
continueOnError: true
- task: PublishBuildArtifacts#1
displayName: 'Publish Artifact'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'
ArtifactName: '$(Parameters.ArtifactName)'
I believe, you do not need to install NuGetToolInstaller and vsbuild, you should firstly install DotNetCoreCLI after that you can use it. Here is manual how your yaml file should looks like.
Publishing by the IDE has no pain because it use the tools you have installed on your machine, in the pipeline you need to specify the toolin you gonna use and that is the pain.
For those who are not using the new YAML based pipeline but instead use classic editor on devops you might need to add dot net core add task and change from nuget restore to dotnet restore task
When I create a pipeline from the Azure Devops UI, my YAML looks like the below. It uses DotNetCoreCLI instead of VSBuild. Notice that it uses the Restore command instead of anything having to do with Nuget.
pool:
name: Azure Pipelines
#Your build pipeline references an undefined variable named ‘Parameters.RestoreBuildProjects’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab. See https://go.microsoft.com/fwlink/?linkid=865972
#Your build pipeline references an undefined variable named ‘Parameters.RestoreBuildProjects’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab. See https://go.microsoft.com/fwlink/?linkid=865972
#Your build pipeline references the ‘BuildConfiguration’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
#Your build pipeline references the ‘BuildConfiguration’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See https://go.microsoft.com/fwlink/?linkid=865971
steps:
- task: DotNetCoreCLI#2
displayName: Restore
inputs:
command: restore
projects: '$(Parameters.RestoreBuildProjects)'
- task: DotNetCoreCLI#2
displayName: Build
inputs:
projects: '$(Parameters.RestoreBuildProjects)'
arguments: '--configuration $(BuildConfiguration)'
- task: DotNetCoreCLI#2
displayName: Publish
inputs:
command: publish
publishWebProjects: True
arguments: '--configuration $(BuildConfiguration) --output $(build.artifactstagingdirectory)'
zipAfterPublish: True
- task: PublishBuildArtifacts#1
displayName: 'Publish Artifact'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'
condition: succeededOrFailed()

Source Server and Symbol Server Azure Dev-Ops

I am using Visual Studio 2017 and Azure Dev Ops to run a test on being able to debug a .dll I don't have the source code locally. However, I have run into a problem.
I have a C# .net Standard library with a single class containing a single method in it. I'm using Azure DevOps to do the build for this library. I have created the build pipeline template for an ASP.NET project. The YAML for my build pipeline is as follows:
steps:
task: NuGetToolInstaller#0
displayName: 'Use NuGet 4.4.1'
inputs:
versionSpec: 4.4.1
task: NuGetCommand#2
displayName: 'NuGet restore'
inputs:
restoreSolution: '$(Parameters.solution)'
vstsFeed: 'a1deac36-75b8-4a5c-a86c-26a137db5913'
task: VSBuild#1
displayName: 'Build solution'
inputs:
solution: '$(Parameters.solution)'
msbuildArgs: '/t:restore;build;pack /p:PackageVersion=$(Build.BuildNumber) /p:PackageOutputPath=$(build.artifactstagingdirectory) /p:AssemblyFileVersion=$(Build.BuildNumber)'
platform: '$(BuildPlatform)'
configuration: '$(BuildConfiguration)'
clean: true
msbuildArchitecture: x64
task: PublishSymbols#2
displayName: 'Publish symbols path'
inputs:
SearchPattern: '**\bin\**\*.pdb'
SymbolServerType: TeamServices
continueOnError: true
task: PublishBuildArtifacts#1
displayName: 'Publish Artifact'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'
ArtifactName: '$(Parameters.ArtifactName)'
The build creates .dll, .pdb, and .nupkg files. The .pdb appears to be uploaded correctly to the Symbol Server I have access to. I have created a local c# console app project referencing the built .nupkg file. When I run the console app, it says it loaded symbols successfully from the Symbol Server (my Symbol Cache locally has the corresponding .pdb file). However, when I go to step into the method contained in the class in the .dll, I am prompted for the source code file. In my output window in Visual Studio there is the following error:
SRCSRV: The module 'C:\Users\<USER_NAME>\Source\Workspaces\ConsoleApp1\ConsoleApp1\bin\Debug\ClassLibrary1.dll' does not contain source server information.
I have the 'Enable source server support' checkbox checked, along with the top two child checkboxes selected. I also have 'Enable Just My Code' unchecked and 'Enable Source Link support' checked.
I have read over all of the Microsoft docs pages about .pdbs and Azure Dev-Ops and believe I have everything set correctly, but for some reason it still prompts me for the source file instead of being able to use the source server. So am I missing something in my build or somewhere else that would cause this error when trying to step into the compiled code?

Categories