The specified task executable "postsharp.4.0-x86.exe" could not be run. The filename or extension is too long - postsharp

PostSharp build step fails with
The specified task executable "postsharp.4.0-x86.exe" could not be
run. The filename or extension is too long
when run on build machine or locally with PostSharpHost=Native.
The cause looks to be the large number of references passed to postsharp.4.0-x86.exe via /P:ResolvedReferences parameter.
It works fine locally when using default PostSharpHost=PipeServer. However, PipeServer value is being ignored on build machine when build is run in non-interactive mode.
What are the options to resolve this issue? Is is possible to force using PipeServer on the build machine in non-interactive mode?
Here is a fragment from build log causing the issue:
C:\ProgramData\PostSharp\3.1.73\bin.Release\postsharp.4.0-x86.exe obj\Release\Before-PostSharp\Xxx.xxxxxxxxxxxxxxx.dll /X:default /NoLogo /L:44054-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx /P:Output=C:\Dev\Xxxxx\xxx-xxxxx-xx\Xxx.xxxxxxxxxxxxxxs\obj\Release\Xxx.xxxxxxxxxxxxxxx.dll /P:ReferenceDirectory=C:\Dev\Xxxxx\xxx-xxxxx-xx\Xxx.Xxxxx.XxxxXxxxx /P:Configuration=Release /P:Platform=AnyCPU "/P:SearchPath=..\bin\|obj\Release\|C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\|C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Facades\ " /P:IntermediateDirectory=obj\Release\PostSharp /P:CleanIntermediate=False /P:MSBuildProjectFullPath=C:\Dev\Xxxxx\xxx-xxxxx-xx\Xxx.xxxxxxxxxxxxxxs\Xxx.Xxxxx.XxxxXxxxx.csproj /P:SignAssembly=False /P:PrivateKeyLocation= /P:PrivateKeyContainer= /P:DelaySign= "/P:ResolvedReferences=C:\Dev\Xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxxxxm\lib\AWSSDK.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\BitSyntax\lib\net45\BitSyntax.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\BitSyntax\lib\net45\BitSyntaxCs.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxxxxm\lib\Castle.Core.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxxxxm\lib\Castle.Windsor.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\XxxxxxCxxxxxxxxxxxxs\lib\net40\Xxxxxx.xxxxxxxs.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\XxxxxxCxxxxxxxxxxxxs\lib\net40\Xxxxxx.xxxxxxxxs.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\XxxxxxCxxxxxxxxxxxxs\lib\net40\Xxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\XxxxxxCxxxxxxxxxxxxs\lib\net40\Xxxxxx.xxxxxxxxxs.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxxxxm\lib\FileHelpers.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\FSharp.Core\lib\net40\FSharp.Core.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\FSharp.Data\lib\net40\FSharp.Data.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\FsPickler.CSharp\lib\net45\FsPickler.CSharp.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\FsPickler\lib\net45\FsPickler.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\FsPickler.Json\lib\net45\FsPickler.Json.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\FsUnit\Lib\Net40\FsUnit.NUnit.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxxxxxxx.xxxxxxxxxxxxxxxxxxxxxg\lib\net40\Xxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xx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.xxxxxxxxxxxxxxxxxxxxxxxs\lib\net40\Xxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxxxxxxx.xxxxxxxxxxxxxxxxxn\lib\net40\Xxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxxxxxxx.xxxxxxxxxxxxxxxxxn\lib\net40\Xxxxxxxx.xxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxxxxxxx.xxxxxxxxxxxxxxs\lib\net40\Xxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxxxxxxx.xxxxxxxxxxxxxxs\lib\net40\Xxxxxxxx.xxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxl\lib\net40\Xxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxxxxm\lib\Xxx.xxxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\Xxx.xxxxxxxxxxxxxxxxxxxxxxxxxxs\bin\Release\Xxx.xxxxxxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\Xxx.xxxxxxxxxxxxxxxxxxxxxxs\bin\Release\Xxx.xxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\Xxx.xxxxxxxxxxxxxxxxxxxxl\bin\Release\Xxx.xxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-xx\packages\Xxx.xxxxx\lib\net40\Xxx.xxxxxxxxxxxxxxxx.dll|C:\Dev\xxxxx\xxx-xxxxx-

The issue has been fixed in PostSharp 4.2.14. Please update to the latest version.

Related

OpenQA.Selenium.WebDriverException : unknown error: cannot find Chrome binary

I am trying to run my tests on Azure Devops pipeline and I am getting the below mentioned error. Most solutions are asking to specify (hard-code) the binary path but that can not be implemented on servers. Furthermore, the tests run fine locally.
It seemed like the agents did not have chrome installed, but then again, these tests ran fine on the same agent pool a while back.
NUnit Adapter 3.15.0.0: Test execution complete
X CreateAgentApp [< 1ms]
Error Message:
OneTimeSetUp: OpenQA.Selenium.WebDriverException : unknown error: cannot find Chrome binary
X CreateProject [< 1ms]
Error Message:
OneTimeSetUp: OpenQA.Selenium.WebDriverException : unknown error: cannot find Chrome binary
X CreateSPAApp [< 1ms]
Error Message:
OneTimeSetUp: OpenQA.Selenium.WebDriverException : unknown error: cannot find Chrome binary
I am initializing the ChromeDriver with the following options:
{
ChromeOptions options = new ChromeOptions();
options.AddArgument("--disable-features=VizDisplayCompositor");
return options;
}
Secondly, is it possible to add a demand variable in pipeline settings to check Chrome existence.
Since demands syntax cannot detect the existence of Chrome.
I manually checked this site.and found Chrome and chromedriver.exe are installed in microsoft-hosted agent pools Hosted Windows 2019 with VS2019 and Hosted VS2017.
You can just run selenium ui tests against these agent pools.
Don't know how you set the chromedriver path? But I found a way to get the chromedriver.exe path of the agents using below powershell scripts. And the path is
C:\SeleniumWebDrivers\ChromeDriver on agent.
$driverpath = Get-ChildItem Env:ChromeWebDriver
For test purpose i hard code above driver path in my code. The tests ran as expected on hosted agents.
If you dont want to hard code the path, you can add a powershell task to output driver path, and replace the driver path in your test code with the parameters in your test .runsettings files
echo "##vso[task.setvariable variable=chromedriverpath;isOutput=true]$driverpath"
I had the same issue and found that chromedriver and Chrome versions should be compatible. MS hosted agents have both preinstalled as mentioned in other answers (refs: MS-Hosted Agents, Windows-2019/latest).
To ensure the versions work, there are few options depending on the scenario.
If chromedriver is expected to be in the output directory, e.g. using Selenium.WebDriver.ChromeDriver, then either;
use the same versions of chromedriver and Chrome of the build server (see refs above) in code; or
copy chromedriver from the build server to the output directory during build using the environment variable $Env:ChromeWebDriver.
Copy-Item "$env:ChromeWebDriver/chromedriver.exe" -Force -Destination "**/bin/Release/*/"
Alternatively, set the driver path dynamically; maybe checking for the environment variable ChromeWebDriver.
pseudo-code for illustration only
...
var driverDir = Environment.GetEnvironmentVariable("ChromeWebDriver");
var driverPath = !string.IsNullOrWhiteSpace(driverDir)
? Path.Combine(driverDir, "chromedriver.exe")
: "relative/path"; // see below
// init the driver or add to options
var driver = new ChromeDriver(driverPath)
...
For the relative path, see this question How can I instantiate a new ChromeDriver using a relative path in C#?

TeamCity, version numbers from file in repo and assembly patcher

Context
In our repo, we have a file called version.txt that contains the major and minor version number: 0.7.
I added a TeamCity build step with a powershell script that sets this parameter into a config parameter, based on this answer:
$version = Get-Content version.txt
Write-Host "##teamcity[setParameter name='UserMajorDotMinor' value='$version']"
The UserMajorDotMinor parameter defaults to 0.6 on TeamCity.
I have a config parameter called %UserVersionNumber% that is used to set the actual version number, which is defined as
%UserMajorDotMinor%.0.%system.build.number%
The Problem
While prints 0.7 in the TeamCity build log, but it doesn't seem to properly set the UserVersionNumber, because the number that the assembly patcher writes into the dll is still 0.6.0.xxxxx.
What do I have to change so TeamCity will actually write the correct version number into the dlls?
The Assembly Info Patcher build feature will run before any build step, therefore, changes made to parameters within a step won´t affect the Assembly Info Patcher
If you really need to use the Major.Minor Info from the version.txt file then i would setup a seperate build configuration that reads the file and provides the content as build parameter %UserMajorDotMinor%. Basicly what you already did.
Then you can add the newly created config as dependency to the actual build and set the %Version% Parameter to %dep.[buildconfigname].UserMajorDotMinor%.0.%system.build.number%
As a Alternative, use a Script to patch your AssemblyInfo.cs files as seperate build step instead of the Assembly Info Pather Feature.

Gallio with NCover shows 0% code coverage in Sonar UI

I am using sonar-runner to run tests and code coverage over my C# code with the help of gallio plugin. The tests are running fine, but I am not able to see any code coverage on the sonar web UI.
My Sonar settings are as follows:
sonar-project.properties
mentioning only relevant bits
sonar.gallio.coverage.tool = NCover
sonar.NCover.installDirectory = C:/Program Files/NCover
sonar.donet.visualstudio.testProjectPattern = .Test
sonar.dotnet.buildConfigurations = "Release|x86"
Any idea what coule be missing??
sonar.projectKey=XXX:XXX
sonar.projectVersion=trunk
sonar.projectName=XXX
sources=.
sonar.language=cs
sonar.dotnet.visualstudio.solution.file=Project.sln
sonar.dotnet.excludeGeneratedCode=false
sonar.dotnet.4.0.sdk.directory=C:/WIndows/Microsoft.NET/Framework/v4.0.30319
sonar.dotnet.version=4.0
# Gallio
sonar.gallio.mode=
sonar.gallio.coverage.tool=NCover
sonar.gallio.runner=IsolatedAppDomain
sonar.NCover.installDirectory=c:/Program Files/NCover
sonar.gallio.installDirectory=C:/Program Files/Gallio
sonar.dotnet.test.assemblies=$(SolutionDir)/../**/bin/**/*.Tests.Unit.dll
# FXCop
sonar.fxcop.mode=
#StyleCop
sonar.stylecop.mode=
#NDeps
sonar.ndeps.mode=skip
sonar-runner.properties
You said
sonar.dotnet.buildConfigurations = "Release|x86"
If that's true, your build likely isn't generating .pdb files, which are needed to figure out the mapping between the binaries and your source files.
Does it work if you try it with a Debug build?
I was seeing this same behavior with NCover in Sonar. I found that Sonar was generating invalid arguments for Gallio's NCover runner.
Try piping the output from Sonar's runner into a text file so that you can examine the arguments more easily (on the command line, you can just type sonar-runner > output.txt to do this).
You will likely see a line like this in your output:
INFO .u.c.CommandExecutor - Executing command: C:\Program Files\Gallio\bin\Gallio.Echo.exe /r:Local /report-directory:E:\Reports\.sonar /report-name-format:gallio-report /report-type:Xml E:\Projects\UnitTests\bin\Release\UnitTests.dll /runner-property:NCoverCoverageFile=E:\Reports\.sonar\coverage-report.xml /runner-property:NCoverArguments=//ias MyFirstAssembly;MySecondtAssembly;MyThirdAssembly
If you attempt to execute this manually via Gallio on the command line, you will get an error:
Cannot find file 'MyFirstAssembly;MySecondtAssembly;MyThirdAssembly'
If you edit this list manually down to a single entry such as MyFirstAssembly*, everything will work as expected.
This seems to indicate that Sonar is generating invalid command line arguments for Gallio. As much as I love NCover, the easiest solution was to use OpenCover instead.

NUnit-console 2.5.4 not capable of running multiple assemblies?

I am having problems running tests with the command line NUnit test runner.
I am using version 2.5.4 with .NET 4 on an x64 machine.
Using the following line results in a failure "Could not load file or assembly 'bar' or one of
its dependencies. The system cannot find the file specified."
nunit-console-x86 foo.dll bar.dll /framework=4.0.30319
If I reverse the dll file names it complains about not finding 'foo' instead...
It works if I run them separately like:
nunit-console-x86 foo.dll /framework=4.0.30319
Also the tests of the second file works if I run:
nunit-console-x86 bar.dll /framework=4.0.30319
Before upgrading our projects to 4.0 we used NUnit 2.5.2 and the same command line tool options and at that point the runner worked well with multiple assemblies. It seems like the ability to run tests on multiple files at the same time is broken...
Anyone that can see the same behavior or does it work indicating that my environment is somehow broken?
/Per
Assembly loading behaviour has changed between 2.5.4 and 2.5.3. It was causing problems for us, so we reverted to 2.5.3, since that still supports the 4.0 framework.
We use nunit-console.exe 2.5.3 with multiple assemblies in our msbuild script, which looks like this:
<Exec Command="%22$(NUnit_Install_Directory)bin\net-2.0\nunit-console.exe%22
/noshadow #(TestableAssemblies, ' ') /xml $(BuildFilesPath)\NUnit-Results.xml" />
On execution, it fills out like this (edited for readability):
"c:\Program Files\NUnit 2.5.3\bin\net-2.0\nunit-console.exe" /noshadow D:\BuildAgent\GojiSoft.Application.Test\bin\Release\GojiSoft.Application.Test.dll D:\BuildAgent\GojiSoft.Common.Test\bin\Release\GojiSoft.Common.Test.dll
/xml D:\BuildAgent\work\2f016459feee51ce\Build\NUnit-Results.xml
We don't use a 64bit machine for our unit tests, so YMMV.
I have a blog post about the addtional modification your should make to the nunit-console-x86.exe.config here: Getting .Net 4.0, Team City, MSBuild and Nunit to play nice.
I has the same problem. I got around it by creating an nunit project in the GUI that includes multiple dlls. Then I can run it with nunit-console.

NUnit assembly not found

I've used NUnit before, but not in a while, and never on this machine. I unzipped version 2.4.8 under Program Files, and I keep getting this error when trying to load my tests.
Could not load file or assembly 'nunit.framework, Version=2.4.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77' or one of its dependencies. The system cannot find the file specified**
In order to simplify the problem, I've compiled the most basic possible test file.
using NUnit.Framework;
namespace test
{
[TestFixture]
public class Tester
{
[Test]
public void ATest()
{
Assert.IsTrue(false, "At least the test ran!");
}
}
}
I've added "C:\Program Files\NUnit-2.4.8-net-2.0\bin" to my PATH (and rebooted). Note that if I copy the test assembly into that folder, then
C:\Program Files\NUnit-2.4.8-net-2.0\bin>nunit-console test.dll
works, but
C:\Program Files\NUnit-2.4.8-net-2.0\bin>nunit-console c:\dev\nunit_test\test.dll
and
C:\dev\nunit_test>nunit_console test.dll
fail with the above error.
Presumably I could get around this by copying the NUnit.Framework DLL file into my project's bin folder, but I don't remember having to do this in the past. Moreover, I get the same error in the GUI. Shouldn't the GUI know where the framework is located (that is, in the same folder)?
I'm not using Visual Studio. I use the following line to compile the test project.
%windir%\Microsoft.NET\Framework\v2.0.50727\csc.exe /r:"C:\Program Files\NUnit-2.4.8-net-2.0\bin\nunit.framework.dll" /t:library /out:test.dll test.cs
I tried both the .msi and the .zip file with the same result.
Make sure you have added a reference to nunit.framework. If you have, then make sure the properties of that reference have the copy local property set to true.
I had the same problem, and I had installed using NUnit-2.4.8-net-2.0.msi. Expanding on the "add to the GAC" comment, here's what I did:
Open your "Visual Studio command prompt (generally: make sure gacutil is in your path) and: cd "C:\Program Files\NUnit 2.4.8\bin"
Unregister your NUnit entries from the GAC. You can do this by finding the NUnit entries registered in the GAC:
gacutil /l | find /i "nunit" > temp.bat && notepad temp.bat
Prepend the nunit.core and nunit.framework lines with "gacutil /uf", i.e.:
gacutil /uf nunit.core,Version=2.4.2.0,Culture=neutral,PublicKeyToken=96d09a1eb7f44a77
gacutil /uf nunit.framework,Version=2.4.2.0,Culture=neutral,PublicKeyToken=96d09a1eb7f44a77
Run your .bat file to remove them:
temp.bat
Register the NUnit DLL files you need:
gacutil /i nunit.core.dll
gacutil /i nunit.framework.dll
If you install using NUnit-2.4.8-net-2.0.msi, the NUnit assemblies are added to the GAC.
You can also reinstall manually by running gacutil from the Visual Studio 2005 command prompt.
Note that the current NUnit installation (2.5.10) doesn't register itself automatically in the GAC.
If you must use GAC, register it via gacutil /i <nunitframeworkpath> where nunitframeworkpath is usually %Program Files%\NUnit\net-2.0\framework\nunit-framework.
I got this error message today when I tried to add a new test assembly to an existing NUnit test project. It seems that my test projects had multiple path references to identical nunit.framework.dll assemblies.
If you have more than one test assembly in your NUnit project, you may want to verify the Path property of the nunit.framework reference in your test projects. Once I made them match, the error message went away.