Hello, I have an Automation framework written in c# using specflow - visual-studio

I have been trying to open the project in the Visual studio 2017 community. But I am getting an following error while building the solution:
error : SpecFlow designer codebehind generation is not compatible with MSBuild codebehind generation. The custom tool must be removed from the file. See http://www.specflow.org/documentation/Generate-Tests-from-MsBuild
But I was able to run the tests, Wierd!

Related

Visual Studio 2017: which template to use for additional dependencies?

I have a solution in Visual Studio 2017 which includes several C# projects.
However, the application I'm developing also requires an additional component which is not written in a language supported by Visual Studio (it's a custom javascript library with its own custom compilation/code generation script).
I would like to include this component (it's just a bunch of text files, mainly .js and some others) in my Visual Studio solution, so I have everything in one place. Also, if I include it as a VS project, I can leverage the Pre-Build / Post-Build events to run the component's compilation script, without having to manually run a batch file like I'm doing now.
My question is: which Visual Studio "project type" (i.e.: template) is best for this scenario? I don't need to compile anything, the project only needs to be a "file container" basically...

Build .net standard 1.4 class library TFS 2015 on premise

We are building a web API application for a Xamarin forms app. I included a .NET standard class library project to use as my view models. The idea being as we build out the web api endpoints - I will publish the updated class library to our internal NuGet server.
Our CI is failing. When I check in the code - I am getting a build error (using TFS 2015 on premise). The first error I received was
The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="http://schemas.microsoft.com/developer/msbuild/2003" to the element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format.
So I added the XML namespace to the csproj
Now I get this:
There is no target in the project.
Which version of Visual Studio do you use? Can you build the project locally with VS or build with msbuild in command line?
Anyway, based on the error message, it seems related to the version of VS which created the project and the msbuild version (New .csproj project format applied in VS 2017). You can reference below threads to troubleshoot the issue:
For the first error:
The default XML namespace of the project must be the MSBuild XML namespace
Visual Studio .NET 2015 can't open migrated project
For the second error:
Visual Studio 2010 Project Targets
Add the following attribute to the Project element:
DefaultTargets="BuildTarget"
That will tell MSBuild to use the target named "BuildTarget" when we do a build. Next add the following subelement to the Project element (just before the last line, which has "</Project>"):
<Target Name="BuildTarget">
<Message Text="Build selected" Importance="high"/>
</Target>
Then save the file and close the edit window. Then return to the Solution Explorer and right-click on the solution and select "Reload Project". Then build the project. You should get the message "Build selected" along with the output of the build, as in:
So answer is not possible. I have tried install VS 2017 on the agent - that didn't work.
We did find an article that TFS needed to be upgraded beyond Update 3.
I will end up upgrading us to 2017 in a few months - which will make this a moot point.
Thanks for the answers.

Error building tesseract in visual studio 2010 using emcripten

I'm having following error when i'm trying to build tesseract VS2010 bundle in visual studio 2010 using emscripten.
I configured visual studio as they have mentioned in their documentation. but when i click build solution i get following error.
error MSB4044: The "GCCCompile" task was not given a value
for the required parameter "GCCToolPath"
How can i fix this.
I had a similar issue with some other project and fixed it by changing the "Platform Toolset" to "Emscripten" in the project "Configuration Properties"
Ideally it should have changed automatically when I switched to Emscripten as the platform, but somehow it didn't.
Additionally set the "Configuration Type" to "Console Application (.js)" (or html as you would require)

While Creating setup showing Error in visual studio

I am working on visual studio 2010. I am trying to Rebuild my setup project but I am getting these 3 error(s):
1: An error occurred generating a bootstrapper: Unable to finish updating resource for C:\Users\IBS Support\Desktop\Evalet Without Printer & Stored Procedrure\1\EVallet-Desktop\EvaletSetup\Debug\setup.exe with error 80070005
2: General failure building bootstrapper
3: Unrecoverable build error
I am using MS Visual Studio 2010, version 10.0.30319.1
(.Net FrameWork Version 4.5.50709)
This post should help you.
Quote from the post:
This happens because The .NET framework version required by the setup project is different than the .NET framework version targeted by the application.
To verify this:
In Solution Explorer, select the setup project.
On the View menu, point to Editor, and then click Launch Conditions. Click .NET
Framework.
In the Properties window, change the Version property to the version of the .NET Framework that you want the setup project to check for and install.
Hope this helps?

Run Tests Unavailable in Visual Studio

Not strictly a programming question, but definately programming related.
The option to run tests in Visual Studio is greyed out for some reason. I've just started a File | new MVC Application, using VS2008pro.
alt text http://www.olympianbot.co.uk/images/greyed-tests.jpg
Any idea what causes this / how to resolve it?
Visual Studio recognizes test projects by a special GUID. If there's a project with the GUID : FAE04EC0-301F-11D3-BF4B-00C04F79EFBC, VS will automatically load tests from it. So make sure that in the .csproj of your test project you have the correct GUID:
<ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

Resources