When I am editing a css or JS file that is in say a folder called "Theme". How do i set up another folder say it is called "ThemeBackup" to auto sync its internal files.
Example:
If I edit "Theme/css/mystyle.css". Then i want Visual studio to automatically checkout the file "ThemeBackup/css/mystyle.css" and make the same change i just made, syncing it with the original.
Aditional information:
I am using a ASP.net MVC4 Web Application
Related
I am attempting to publish an application from visual studio that has files in the solution. After instilling the program and executing it I get this error.
Could not find file
'C\Users[User Name]\AppData\Local\Apps\2.0\7D4MADG.G94\9BLZYH2N.QOP\wdts..tion_0000000000000_0003.0000_8e564612a360b47a\wdAttrColSettings.xml
I need to know what I need to do to have the files in the Solution Items folder put in the wdts..tion_0000000000000_0003.0000_8e564612a360b47a folder when the application is installed.
In my brief experimentation in Visual Studio 2019, it doesn't look like you can copy Solution Items to the output directory.
This is, presumably, because there's no actual project (i.e. MSBuild or whatever) that would define those actions.
If you put those files inside one of the projects, you can use the "Copy to Output Directory" property.
I am using SonarLint in my .NET core project. When integrating projects with SonarLint, the following files are generated inside a .sonarlint folder:
<SonarQubeProject>CSharp.ruleset
<Solution>.slconfig
The .ruleset file contains the rules for sonarlint and sonarqube, so I'm already keeping this file in source control.
But what about the .slconfig? Should I keep this file in source control or should I exclude it? (add it to .gitignore in my case)
This file should be included in source control.
This file controls synchronization between source code and SQ.
It includes among others:
ServerUri pointing to the SonarQube server to which this project is bound to.
ProjectKey with the key of the project in the SQ server
Profiles which includes a ProfileKey that is an identifier for the Quality profile selected in the server.
Source: This post from the SonarSource community: SonarLint source control
I have Microsoft SQL Server Data Tools for Visual Studio 2017, version 15.5.4.
I have created a report .rdl file that I want to use as our report template.
I copied this .rdl file to:
C:\Program Files (x86)\Microsoft Visual Studio\2017\SQL\Common7\IDE\CommonExtensions\Microsoft\SSRS\ProjectItems\ReportProject
After restarting SSDT/Visual Studio, I couldn't see any change.
Just in case, I also copied an existing .ico icon file and named it the same as the report. Also I added a new line to the ReportProjectItems.vsdir file.
Still, I cannot see my report template after restarting SSDT/Visual Studio when I try to create a new SSRS project. I must be missing something, but I've gone over all of the other similar questions here, and still no luck. Has anyone figured this out?
screenshot of folder and files
From what I can see, you are saving the template.rdl file in the correct location. In order to use the new template, you would need to create a new report by right clicking on the "Reports" folder for that poject and selecting Add > New Item.
Reports > Add > New Item
From there you can choose the template .rdl you uploaded earlier.
Just to wade in on this one, I've been researching exactly the same thing today. The Microsoft docs (As per usual) are utter rubbish. They do not give the correct file path and the one that worked for me very similar to the one that PatrickMcd listed in his screenshot (I'm using VS2017 Professional btw):
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\SSRS\ProjectItems\ReportProject
When I placed my template RDL in this folder, I did have to restart VS2017 but then it worked a treat and appeared as an option when adding a new report.
To reiterate, the rdl needs to go in:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\CommonExtensions\Microsoft\SSRS\ProjectItems\ReportProject
I can't say here what I think the MS docs are but it rhymes with white.
I'm, porting a phone application written using MVVMCross to Windows RT. The application uses SQLite and has a database that is not empty at deploy so I want it to be packaged in the installation folder anc copied to LacalFolder when the application starts.
The database really belongs to the "Core" assembly shared between phone and WinRT but if I put the file in the Core project (in a custom directory called Data), define it as Content and set the Copy Always flag the file does not get copied to the application installation folder.
If I put the file in a directory under the UI project the file gets copied as expected. Any suggestion to avoid keeping two files for the same resource (and the troubles this will cause) ?
Thanks for help
Windows 8 WinRT projects by default use the Content type which does loose packing of files (they are not included in the assembly). If your Core assembly is part of your solution as a project - VS will properly package it copying all the content to the "Core" subfolder of the appx. If you simply have the dll file referenced in your solution - the resource files will not be packaged. The solution in that case is to do something to get these additional files to deploy with the dll. One option is to package the dll as a .vsix together with the assets as described in Tim Heuer's blog post. Another is to do what you did and put the file in the app project. You can add the file to the app project "As Link" to avoid having a copy of the file - it makes Visual Studio create a sort of logical/symbolic link to the file instead of creating a copy - simply right click a folder in the Solution Explorer/app project, select "Add/Existing Item", browse to the file and instead of hitting the "Add" button - use the dropdown triangle on the button to select "Add As Link".
So, i'm developing my razor macroscripts in Visual studio for my Umbraco project.
Everything is working fine, but there are two things really annoying.
If I want to make a new CSHTML file the best solution for this is to duplicate an existing file.
I dont have full razor IntelliSense like e.g. Html.Raw
Is there a way to configure my project to use this features? Didn't find a .cshtml template yet.
You need to have the MVC Framework installed, then when you open the project as a website, you should be able to create and edit cshtml files with syntax highlighting. See my answer to the following post for more details:
Setting up local development environment for Umbraco
If your project is a web site/application then the mvc templates aren't available (they only show up in MVC projects). You can just create a text file and name it with the .cshtml extension though (you could set up your own template for this in VS if you wanted to).
To get intellisense in your Razor files, see Doug Robar's blog post on the subject
As an alternative if you go into the Umbraco admin, go to the 'Developer' section and right click on 'Scripting Files' you can create razor scripts directly (and this will save the new .cshtml directly into your 'macroScripts' folder - although in VS2010 you will need to right click on the new script and choose 'include in project').
Also this will allow you to base your new razor macroscript on one of the pre-built snippets so you may get a bit of core functionality for free.
From Umbraco 6 on it's very convenient to install Umbraco on your local file system with Visual Studio and NuGet. Given that you have the MVC Framework installed and you use Visual Studio 2012 or above, you get full Razor support in Visual studio.
Umbraco Our has a great blogpost about this where they described the steps below in detail (with screenshots!).
Create an Empty Web Application.
Install Umbraco using Manage Nuget Packages ('Umbraco CMS') or the Package manager console (Install-Package UmbracoCms)
NuGet will then download dependencies and will install all of Umbraco's files in your new solution. During this process it will ask if it is allowed to overwrite your web.config file. (Make a back up of your existing web.config if you install Umbraco in an existing project)
Finally, don't forget to run your project hitting F5. You'll see that whenever you try to add or edit a file in your views folder you have razor support and intellisense