Where is the WebMatrix main config file? - webmatrix

I want to tweak the main config file for web matrix. I thought I found it in
C:\Program Files (x86)\Microsoft WebMatrix\config\applicationHost.config
but changing the file and restarting WebMatrix has no effect. Where can I find the file that it's using?

Worked it out. The config file WebMatrix actually uses is in IISExpress8\config in your My Documents folder, called applicationHost.config

For WebMatrix beta release config file was in %userprofile%\my documents\iisexpress8\config, but now (WebMatrix released), path is %userprofile%\my documents\iisexpress\config

Related

Why does Visual Studio publish packages.config too?

When I use the option Publish... selecting as target the file system in Visual Studio 2015 it compiles the code, do the XML transformation in the Web.config files and copy the files to the folder I specified.
It does not copy any *.cs file as expected since it is compiled.
Something that I don't understand is why it publishes the Nuget Config file (packages.config), after all, the files needed are already in the bin folder.
I found this question that says how to avoid but not the reason they decided this file would be usable on the server.
Can I stop VS from publishing packages.config?
Anyone know why packages.config end up in the publish folder?

NUnit not looking the file in the right folder

I just updated nUnit from 2.6.4 to 3.0.1 on my VS2015. Everything went well with just ONE problem.
In my Test method, I have to load a xml file, let's call it UnitTestConfiguration.xml, it is saved inside the same root folder as the app.Config and package.Config file. With NUnit 2.6.4, this xml file is being found and load perfectly.
But, with Nunit 3.0.1, I receive this error:
System.IO.FileNotFoundException : Could not find file 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 14.0\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\TESTWINDOW\UnitTestConfiguration.xml'.
So my question is, why would 3.0.1 not look into the root folder of the test project to begin with, but somewhere else? Is there any setting(s) to correct it?
Yes, this is a Breaking Change in NUnit3, tests are no longer ran in the root folder.
Use TestContext.TestDirectory to reach it.

The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" was not found

The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
Problem occurred when i restarted visual studio application.Please help me to fix this problem.
i dont know what actually happend...."VisualStudio" forlder is renamed to " VisualStudio" .. I solved this problem by creating new folder named "ViusalStuido" and copied files from " VisualStuido" to this.

How to "unignore" Visual Studio Web Site *.refresh files when you have [Bb]in/*

I'm using the standard Visual Studio .gitignore at
https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
Part of that gitignore is to ignore the bin folders, but this is a problem, because I need to include bin/*.refresh files for visual studio web site projects.
When one has a (local file) web site project in: C:\Projects\MyprojectA\MyProjectWeb then any references to libraries are stored as "hint files" in the C:\Projects\MyprojectA\MyprojectWeb\bin folder as *.refresh.
So if you reference (a non framework DLL) AjaxControlToolkit.dll, so in the bin folder, you end up with AjaxControlToolkit.dll and AjaxControlToolkit.dll.refresh. The content of the file indicates the path of where to find that DLL. (Let's ignore the potential pathing problems when the repo is cloned, because we're checking in the DLLs into a _lib folder that's also checked into the repo)
How does one "unignore" the *.refresh files found within Visual Studio Web Site project bin folders so that they are included with clones of the repo?
How about using this VS feature?:
Use the exclamation mark.
**/[Bb]in/*
!**/[Bb]in/*.refresh
Once folders are excluded they can't be un-excluded. Do it this way to include sub-folders like roslyn.
replace
[Bb]in/
with
**/[Bb]in/**/*.*
!**/[Bb]in/**/*.refresh
Tiny expansion to Alex' answer, the 'Add Ignored File' button might be hidden under the 'Git' submenu.
'Add Ignored File to Source Control' button

How to get WinForms app to find a log4net config file when running from the IDE?

I'm using log4net with a VisualStudio WinForms app, and I need log4net to find its config file. (I must keep the config settings in a separate file.)
It works if the config file is in the directory with the executable, but how do I get it there? For now I've added a post-build action:
copy "$(ProjectDir)test.log4net.xml" "$(TargetDir)"
But isn't there a better way? For such a simple task this seems like an awful kludge.
It's only a problem in development, because at deployment I can install the file with the executable. I'm using VS 2010, if that matters.
I "include" the configuration file so that it's visible in the Solution Explorer, and then in the file's properties in Visual Studio, set "Copy to Output Directory" = "Copy Always".

Resources