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
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.
When I integrated SonarLint into my VS solution, I got a SonarLint.xml file ref. for every project. I wonder, how it is used? Can I remove this reference? Couldn't find any documentation about it.
When I integrated SonarLint into my VS solution, I got a SonarLint.xml file ref. for every project.
This is needed and by-design. The file contains code quality rule parameters used by SonarLint. Example parameter:
<Rule>
<Key>S103</Key>
<Parameters>
<Parameter>
<Key>maximumLineLength</Key>
<Value>200</Value>
When you bind or update your solution from SonarQube, a master SonarLint.xml file gets downloaded into your solution's .sonarlint folder; and a soft-link file to this master file is added to every project being analyzed.
(The SonarLint NuGet apparently does not or cannot access the master SonarLint.xml file, so it needs a project-level SonarLint.xml soft-link file.)
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
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".
Flash builder project files can't be opened on another computer even if the files were copied, for e.g. through version control like git or svn.
Importing and Exporting fxp projects is not possible as we do not want to overwrite files for git or svn unnecessarily.
How do people collaborate on Flash Builder projects without creating new project in Flash Builder and having to set up all the settings for the project again and again for multiple collaborators?
If you import the project using its folder location as per #Sean Fujiwara answer then:
One useful way to collaborate in Flash Builder projects is to utilise environment variables. You can access these using - Window > Preferences > General > Workspace > Linked Resources:
From here you can add a new variable or edit an existing one, from the example above you can see that we use a FRAMEWORK_SOURCE variable which points to the source for our shared framework code, we use a swc but this is handy for debugging errors.
We also have another variable called OUTPUT_FOLDER which in our case points to a folder where we run our project over localhost see example below, to use this in a project, you go to right click project name > Properties > ActionScript Build Path, here you enter the folder name you want creating inside the folder that OUTPUT_FOLDER points to:
When you do a Project > Clean from the menu, all resources from your html-template folder will be copied across to this folder and it should open in a browser.
Now we have been able to check in to SVN our .project and .actionScriptProperities files with few issues. When someone new to the project checks them out, they will get an Error in the Problems panel telling them they don't have for example - OUTPUT_FOLDER\MyProjectName, therefore the project leader should have a document listing all the required variables to be setup in your environment.
Other things you can share are paths to raw font files etc.
The only problem I've had with this approach is sometimes it asks for the path to the SDK if it is different from your location, not had chance to figure this one out yet.
Flash builder project files can't be opened on another computer even
if the files were copied, for e.g. through version control like git or
svn.
Flash builder projects can be imported into the workspace just like other Eclipse projects.
Once you copy them to another computer:
Right click in package explorer and go to Import....
Select General/Existing Projects into Workspace.
Select the folder containing the .project directory.
If you make sure Copy projects into workspaces is deselected, you can commit the files directly from wherever you checked the code out.
This is now solved in Flash Builder 4.7 where you can actually import the project folder as is.