I am using Visual Studio 2017 Pro, and i am being driven crazy by the lack of syntax highlighting for the Jenkinsfile in my project. I am using the Declarative Syntax, but i just cant seem to find anything on getting this to work. My research says that its based on groovy, but i dont see a way to map it to that language either. Any help is appreciated.
This might not be a solution for everyone, but for me, it worked:
Jenkinsfiles are the only files without extension I am working with, therefore I opened
Tools -> Options -> Text Editor -> File Extensions
and then, I checked "Map extensionless files to:" and selected "Javascript Editor"
This does not require to install any extension and the display is great
I am in the same boat. Using Visual Studio 2017 Enterprise.
I found this extension recently for Visual Studio Code and this extension for Visual Studio.
Related
Seems like a simple thing but I cannot find it anywhere online.
If you have any guide on debugging F# script file (fsx) in Visual Studio Code, please share, thank you.
It seems that debugging of F# scripts (fsx) is currently not supported in VS Code, and unfortunately also not in Rider or the standard VS (which has a setting to enable it, but even then debugging does not work with .NET 6 fsi).
Check these github issues for more info (hopefully I did not misunderstand them):
https://github.com/dotnet/fsharp/issues/12084
https://github.com/dotnet/fsharp/issues/5457
https://github.com/dotnet/fsharp/issues/9397
https://github.com/dotnet/fsharp/pull/12722
I am using visual studio 2019 in mac to setup my test automation framework in c# & Specflow . When i build my test automation framework in VS i am getting below error :
SpecFlow designer codebehind generation is not compatible with MSBuild codebehind generation. The custom tool must be removed from the file
On searching through forums, people recommending to remove the custom tool selected as "SpecFlowSingleFileGenerator". But when i check the same in VS 2019 for Mac it is not enabled for me to remove.
attaching the screenshotn. Can anyone help me with this issue ?
I'm not familiar with Visual Studio for Mac, but presumably the settings are the same or similar to Windows.
Check the SpecFlow options in Visual Studio. Make sure Enable SpecFlowSingleFileGenerator CustomTool is set to False. If Visual Studio for Mac is anything like windows, go to Tools > Options > SpecFlow, then look under the Legacy section.
A screenshot from Windows is below, showing the setting in question:
I've been trying to get custom CodeTemplates working in VS2017 Community edition without much luck. I've copied the %Program Files%\Microsoft Visual Studio\2017\Community\Common7\IDE\Extensions\Microsoft\Web\Mvc\Scaffolding
files to CodeTemplates/ in my proj, tweaked the templates but I don't see any changes. I've customized the templates in prior vers of VS. Is it not supported in VS2017 Community Edition?
It works well in Visual Studio 2017. And yes that's the right folder you are looking at. You must copy the files as you did already and make sure to delete all the .vb.t4 if you are using c# as language from the CodeTemplates folder and vice-versa.
One more suggestion is to check and tweak the right template, since it has got withContext, withAction, Empty, etc...
EDIT :
Also when scaffolding, try to add -Verbose to the command, it'll tell you from where the templates are picked.
you can find it here:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\Extensions\Microsoft\Web\Mvc\Scaffolding\Templates\MvcView
I have a VSIX extension (https://github.com/eduelias/AssociateRecentWorkItems) that worked really well on my VS2015 but, as I built/run it on VS2017 (yeah, I've put the prerequisites on the .csproj properties), it is not appearing at 2017's TFS Pending Changes tab.
I've tried updating MIcrosoft.TeamfoundationServer.Controls to the 2017 version but still no success.
As I try to debug it, it seems that VS2017 isn't loading the extension at all. (Breakpoints aren't not been loaded)
Any help is welcome. Thanks!
Give a try with another new extension on VS2017(from marketplace) in your side. If this could also not installed successfully and you are using VS2017 RC.
You may encountered this issue--Unable to install extensions after updating VS2017 RC
Either update to latest VS version or use Stefan Z Camilleri 's workaround in above link.
If only your old extension could not be installed, since
Huge changes have been made by Microsoft on the installation, so
previous approaches of detecting VS won't work any more. For example,
to detect VS installation folder, now a few extra tools or scripts are
required, https://github.com/Microsoft/vswhere
So guides such as How to: Migrate Extensibility Projects to Visual
Studio
2017
are critical and you can follow the tips.
You could also refer more details in this similar question Visual Studio 2017 is not detected by extensions for installation
Looking through the log, I was able to find that some of my references were asking for Microsoft.TeamFoundation.Client Version=14.0.0, in fact, It was the Microsoft.TeamFoundation.VersionControl version=12.0 that were looking for it.
To solve it, I've made a 'binding redirect' like this:
[assembly: ProvideBindingRedirection(AssemblyName = "Microsoft.TeamFoundation.Client", NewVersion = "15.0.0.0", OldVersionLowerBound = "12.0.0.0", OldVersionUpperBound = "14.0.0.0")]
It started appearing at the Exp instance and I was able to debug it.
Note that I strongly advise against doing such kind of workaround but, in my case, it was the only way I could make it load my extension so I could debug it.
I just installed Visual Studio 2013 Ultimate trial version for completing the MVC5 tutorial by Rick Anderson, which worht doing it.
The tutorial: http://www.asp.net/mvc/tutorials/mvc-5/introduction/getting-started.
However, I created a blank solution first and then try to add an ASP.Net Application project, which is going to be my MVC5 tutorial project. And I got this weird message:
Error: this template attempted to load component assembly
'Microsoft.VisualStudio.Web.Project, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a'. For more information on this problem
and how to enable this template, please see documentation on
Customizing Project Templates.
But I´m not customizing, I´m just creating a project out of a built in template.
Do you know how can I solve it?
Here is the solution:
In Visual Studio 2013, select Tools > Extensions and Updates
Check for updates. You should have the Azure SDK update available.
Download and install the Azure SDK. After this, everything should work fine.
If your updates are not turned on, enable your auto detection of updates in Tools > Options > Environment > Extensions.
If you have unspecified error related to E_fail(code), try this:
When creating a new MVC 5 application, change the framework version from 4.5.1 to 4.5, if that did not work change it to 4. Check the below image if it is not clear.
Another approach:
This is really important if you are installing Visual Studio 2013 on un-updated Windows 7.
there reason i am calling out "not updated is",
The reason that 'un-updated' matters is because Visual studio 2013 does not update the powershell that is required by VS2013 for most of the stuff.
The simple solution is to update Powershell to the latest version.
If you are not sure how to update powershell, you can use this tutorial.
So I stumbled upon this issue as well and would like to share how I was able to resolve this problem.
Tools -> Extensions and Updates -> Online -> NGet Package Manager: Click the download button once you have the NGet Package Manager selected. Make sure to restart your Visual Studio after you have downloaded the Manager.
This should do the trick
Close Visual Studio, run the VS executable with the command line option as shown below (you will likely have to supply the full path), and relaunch VS normally. This should re-initialize the templates, including the one that you are having problems with.
devenv.exe /installvstemplates
So I faced the same problem with Visual Studio 2013, and I don't know what's the problem but it appears that it only occurs when creating a new project, and choosing "Web" from the panel.
What I did was simply clicking on "Visual Studio 2012" just below it, and it worked !