I have a TFS 2013 RC install running VS 19,12, and 13 on the build agents. I have a build definition using the CopyDirectory action from the toolbox and when I place anything other than a hard-coded path in either the source or destination box, I get this error
The build process failed validation. Details: Validation Error: The private implementation of activity '1: DynamicActivity' has the following validation error: Compiler error(s) encountered processing expression "BuildDetail.DropLocation".'Microsoft.TeamFoundation.Build.Client.BuildDetail' is not accessible in this context because it is 'Friend'.
I have googled this and nothing seems to come up that works.
Any ideas would be great, as we are blocked on using this.
Thanks,
Devin
I believe that you need to use the 2013 build template if you are using the 2013 Build Agent. If you don't want to, or can't, upgrade your template you should reinstall the 2012 build agent which works fine with 2013.
The new templates are on the server, rather than in VC, but you can download them from the build definition screen and check them in if you need to customize them...
So two solutions:
Upgrade your templates to 2013
Downgrade your build agent to 2012 and use the existing templates
Related
I'm a bit lost and hope someone can help. We used to have a TFS build pipeline, but it has now been upgraded to Azure DevOps TFS. At the same time, new projects need to be put in and we want to have them built and analysed using SonarQube. A load of other things have changed (using .NET 6, so using different MSBuild as well, first Blazor project etc.) and the pipeline isn't working.
I have a pipeline that does:
NuGet restore
dotnet restore
Prepare analysis on SonarQube
Build solution **/*.sln (so I can specify the location for the msbuild.exe)
Run Code Analysis
The first 4 steps run fine, but then on Run Code Analysis it fails after ~45 seconds with an error:
INFO: Importing 34 Roslyn reports
INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
INFO: Total time: 42.540s
INFO: Final Memory: 24M/1299M
INFO: ------------------------------------------------------------------------
##[error]ERROR: Error during SonarScanner execution
ERROR: Error during SonarScanner execution
##[error]java.lang.IllegalArgumentException: URI is not absolute
at java.io.File.<init>(File.java:416)
at org.sonarsource.dotnet.shared.sarif.SarifParser10.uriToAbsolutePath(SarifParser10.java:225)
java.lang.IllegalArgumentException: URI is not absolute
at java.io.File.<init>(File.java:416)
at org.sonarsource.dotnet.shared.sarif.SarifParser10.uriToAbsolutePath(SarifParser10.java:225)
[another 80 lines or so of stack trace]
I'm not sure what this is suggesting a fix might be. The step itself doesn't seem to even take a URI, the Project Key/Name that the preparation step has as parameters work okay (testing with a previous pipeline). A Google search has bought up nothing that seems to help.
The only result I found that seemed even vaguely relevant seemed to suggest a fix in the latest version, but TFS only seems to go up to 4.* (4.23.1 specifically) and the latest seems to be 5.* or 6.*
I'm fairly new to all this, so step-by-step low-jargon explanations would be handy, thanks. :)
I am at a new role, and am trying to get started with the Visual Studio solution I will be working on - I am having an issue with the sqlproj within the solution - which is required to get my local instance up and running!
The issue is the publish step - I get the error "Could not find the file c:\Repos<whatever>\debug\bin\Site.dacpac.
Several different sources have suggested simply doing a Rebuild of the project, but VS always skips this project - even if I try a Clean first, or Clean the entire solution and Build after.
I have checked that the build is currently set to produce Debug code, and confirmed the project is set to be built in the Debug/All CPUs configuration.
Is there a way to force it to rebuild?
The only thing that I can think of is that the instructions I'm following request the developer to install SQL Server 2017, but I'd already installed SQL Server 2019 - could there be an issue there?
Resolved: for some reason the sql project didn't want to work with SQL 2019,
so I uninstalled that, and replaced with SQL 2017, and it worked.
I had expected '19 to be backwards compatible with '17, but apparently not.
consider the following in my powershell step:
-source "c:\builds\$(Build.BuildNumber).zip"
result is "c:\builds\20171005.1.zip"
If I try and set the following in the configuration tab of my release variables of release like this
Name=MyBuildNumber Value=$(Build.BuildNumber)
If I change my poweshell to look like this
-source "c:\builds\$(MyBuildNumber).zip"
result is "c:\builds\$(Build.BuildNumber).zip"
What am I a doing wrong here? I have tried a few different flavours of stored variables all with the same effect. Could really use some advice.
---------AS PER ANDY-MSFT----
I can confirm I am using Version 14.102.25423.0. I installed the variable extension pack.. no difference. The logs show the literal output. I am pretty sure I am using the exact same setup you are. Please check the screenshot of my definition variable and powershell syntax.
What's the exact version of TFS 2015 and the anent version do you use?
I tested on TFS 2015 Update4 (Version 14.114.26403.0, Agent.Version:1.95.4), everything works as expected.
So, please check What version of Team Foundation Server do you have, if you are using earlier version, you can try to upgrade to Update4 or later version, then try it again.
Besides, if you still want to keep your current version, you can use the VSTS Variable Tasks extension: Variable Toolbox to expand the build/release variables. (And the source code here for your reference.)
When you define a variable in the Variables screen and use other variables as value, they won't be expanded (as you may have expected). Instead the literal text is passed to the tasks in the workflow. Without this little task the following configuration won't work:
Variable Value
Build.DropLocation \\share\drops\$(Build.DefinitionName)\$(Build.BuildNumber)
By adding the Expand variable(s) task to the top of your workflow, it will take care of the expansion, so any task below it will receive the value you're after.
PS: The new agent (version 2.x) auto-expands variables now.
And this similar thread for your reference:
TFS 2015 Can build variables access other build variables?
UPDATE:
Based on your TFS version, it should be TFS 2015 update3 (You can upgrade to Update4 or later version if that's an option, also upgrade the build Agent accordingly). To check the agent version : Go Manager Server (gear icon) >> AgentPool >> Select a pool >> select an agent >> Switch to Capabilities, you will see the agent version in that page.
I am using Roslyn for application scripting via Nuget Package Manager. Setup should be rather simple. Create new project and, in Nuget manager, add Microsoft.CodeAnalysis.Sripting package. After couple of confirmations you are ready to go.
Next step should be checking for installed packages update. Currently, there are 5 updates that are shown after initial installation. Again, it is pretty straightforward to do this.
However, immediately after the update, two of those packages show yellow triangle in Reference node of the project.
I have tried to resolve this following SO and other hints but nothing helped me so far.
At the end, I have installed new VM with Windows 10 Pro (with all updates) and VS2017 Community Edition. After that new Windows Forms project (.net 4.6.1. based for x64) was created and scripting package is added. Unfortunately, yellow triangles are still there (after update).
Problematic packages are System.ValueTuple and System.Security.Cryptography. X509Certificates.
Also, after cleaning and rebuilding the solution, a number of warnings (MSB3836) - explicit binding redirect on "System..." conflicts with autogenerated binding redirect.
Solution to this problem might shed a light on problem with more complex solution that I stumbled upon after migration to VS 2017.
So, what is the reason for such behavior? Remember, this happens on new installation of OS and VS with simplest project possible.
Visual Studio 2017 Communnity Incorrectly Updates Roslyn Scripting
I got the same result with you steps. This issue only occurred on the Visual Studio 2017 not Visual Studio 2015. That should have some issue with package Microsoft.CodeAnalysis.
To resolve this issue, I would like provide you a workaround:
Update packages "System.ValueTuple" and "System.Security.Cryptography. X509Certificates" first, then update other packages.
It works fine on my side, you can check if it works for you.
In order to track this issue, I have create a new issue on GitHub:
https://github.com/dotnet/roslyn/issues/22290
If you have additional information to add, you can add comments below that issue. And you can check the feedback from this link.
I want to build my application in VS 2017 using the XAML build. I know this is being deprecated very soon, in 6 weeks, but I just want to get it working first.
However even using this technique, which has always been straight forward in the past, when I start the process of creating a new build I get this error message;
How do I fix this?