I use Visual Studio 2013 with Web Essentials. Project has .less files. If i try Go To Declaration of class in markup, Resharper open .css file not .less. This article says that it is possible, but i can't. Is there the way to do it?
Related
Working on a project using Visual Studio as my IDE. It has an API component written in C#, and a webserver component that uses TypeScript.
I am using webpack to deal with the typescript compilation and would like to remove the Visual Studio build step from the typescript files.
Normally I wouldn't care if it was building them, but I am using Typescript > 1.8.4 which has language features that Visual Studio cannot understand which is making Visual Studio throw errors and prevent compilation. I found a workaround for this in this github issue thread but I have other developers cross team who are working on this and trying to coordinate a hack to make code among them will not work.
I have also tried removing the typescript imports line from the .csproj file, but whenever I add a new ts file, it adds the line back in.
Is there a way to completely shut down the typescript compilation/parsing step in Visual Studio and prevent it from coming back?
This in in VS 2015.
You can disable typescript compilation by editing the .csproj file to contain the following:
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
That should disable all typescript compilation within VS 2015.
To disable TypeScript compilation altogether for Visual Studio, edit:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Microsoft\VisualStudio\v15.0\TypeScript\Microsoft.TypeScript.targets
(Your path might be slightly different depending on your OS/VS version, in that case just search for Microsoft.TypeScript.targets)
And add:
<PropertyGroup>
<TypeScriptCompileBlocked>True</TypeScriptCompileBlocked>
</PropertyGroup>
This works for .NET Core projects as well.
It seems that the errors are triggered by IntelliSense and one can remove IntelliSense errors by simply filtering the list.
In case that other solutions doesn't help this is the key to clean up the error list, at least temporarily.
Sam Storie's answer is a great start and it will stop typescript errors from preventing compilation, but Visual Studio will still report the parsing errors which will prevent the ability to use the built in publishing tools.
To completely remove error reporting in ts, find all import lines in the csproj that reference typescript and set the Condition property to false, make sure to restart VS afterwards:
Example:
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets" Condition="false" />
Remove / Uncheck Test Javascript Content Files from the Project filter.
I have the following task: Make a visual editor in Visual Studio (not the core of today's question) which results in a text file, on a custom format. This file will then be used as input for code generation resulting in C# code. For this, I've been looking at:
T4
Visual Studio Extensions
Visual Studio Project Templates
Visual Studio Item Templates
I feel the solution is there somewhere, but I can't quite figure out how best to do it. As I see it, the main problem is somehow to automatically generate code for all files with a given extension. Does anyone know of any tutorials or descriptions on how to do this?
Thanks in advance!
To automatically associate a code generator with all files of a given extension, you need to
Create a Visual Studio package
Implement a custom IVsSingleFileGenerator. The easiest option is to subclass the BaseTemplatedCodeGenerator and override its GenerateCode method to supply your own T4 template as the "inputFileContent".
Use the ProvideCodeGeneratorAttribute to register the generator.
Use the ProvideCodeGeneratorExtensionAttribute to associate the generator with a file extension.
Create a VSIX with your package and generator and have your users install it.
I want to use visual studio intellisense without creating a project( project too big ).
My questing : Is it even possible? If so, how?
To understand better what I want here's some additional info:
The functionality should be similar to ctags in linux. I haven't used ctags much, but at a point in time, when I was coding in vim, I know I had to run ctags to generate the function headers info in the folder which I was working in and then, when I opened a file with vim in a folder which contained ctags generated files, autocompletion worked.
Why I need this:
The project in which I'm working at is very big, and doensn't provide .sln files for Visual Studio 2010, however, when I open a file from the project folder, I want to be able somehow(if it's possible) to use autocompletion. I'm open to using other editors/IDEs too if I'd be able to use autocomplete without creating a project, however I'd prefer using Visual Studio, because debugging is easy cause of the Attach to Process feature.
PS: Languages used: C and C++
I'm using vs2010 and I need to log a multithreading application.
So I decided to use log4net, but as I'm not used to work with this, Intellisense is gonna be worth.
I download the .xsd from http://csharptest.net/downloads/schema/log4net.xsd and put this in VSFolder/Xml/Schemas.
But, how can I say to my log4net.config to use the XSD Schema?
Use the menu XML -> Schemas...
The menu is only there if you have the config file (or any other xml file) open.
Instead of putting it into a VS folder, put it somewhere inside your solution's folder tree. It doesn't even need to be included in any projects. just put it there and it works...
Or into: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Xml\Schemas and you're sorted once and forever.
I have a multiple vcproj solution going and it seems that no other project's intellisense information is available when editing a file in another project. However when I'm within a file in a project, all intellisense information is available for that project.
Any idea why?
Are you missing a using directive or a reference ?
you need to include the other project's namespace in the file with a using directive in order for the intellisense to show for the other project.