VS2013 does not compile ASP.NET MVC5 views

Right click your web project in the Solution Explorer. Click Unload Project. Right click the project and click Edit <projname>.csproj. Make sure you have this element (add it if it doesn’t exist). <Project> <PropertyGroup> <MvcBuildViews>true</MvcBuildViews> </PropertyGroup> </Project> Scroll down to the bottom. You should see some comment “To modify your build process, add your task … Read more

Setting environment variables in pre-build event and using in compilation step

It’s 11 years later than when this question was originally asked. I am using VS 2019 if in the event you want to assign variables in your event like…. set ABC=123 Then you can’t use $(ABC) as the $(ABC) is processed before it is handed to the command line to run. You must use %ABC% … Read more

WPF C# InputBox

I prefer to take an approach using dialogs that doesn’t lock up the application, and moves away from the more traditional Win32 Dialog. Example Input Dialog Hidden In this example I use a simplified version of the MVVM based solution I am using for my applications. It may not be pretty, but should give you … Read more

Xamarin : Android : System.UnauthorizedAccessException: Access to the path is denied

First of all add this permissions to you Manifest: <uses-permission android:name=”android.permission.READ_EXTERNAL_STORAGE” /> <uses-permission android:name=”android.permission.WRITE_EXTERNAL_STORAGE” /> Since Android 6.0 (API 23) you need also to request the permissions manually, add this code on your MainActivity.cs on your Xamarin.Android project: if ((ContextCompat.CheckSelfPermission(this, Manifest.Permission.WriteExternalStorage) != (int)Permission.Granted) || (ContextCompat.CheckSelfPermission(this, Manifest.Permission.ReadExternalStorage) != (int)Permission.Granted)) { ActivityCompat.RequestPermissions(this, new string[] { Manifest.Permission.ReadExternalStorage, Manifest.Permission.WriteExternalStorage … Read more

Recommended number of projects in Visual Studio Solution

I’ve worked on products on both extremes: one with ~100 projects in a single solution, and one with >20 solutions, of 4-5 projects each (Test, Business Layer, API, etc). Each approach has its advantages and disadvantages. A single solution is very useful when making changes – its easier to work with dependencies, and allows refactoring … Read more

debugging with visual studio using redirected standard input

This is a supported debugging scenario. You do have to make sure that the debugger can find the file. Leave the Command setting at $(TargetPath). A possible value for the Command Arguments setting is: < “$(ProjectDir)test.txt” if the input file “test.txt” is located in the project directory. Or type the full path of the file … Read more

How to increase error limit in Visual Studio?

This limitation is hardcoded. Here is the post from the MSFT employee in the microsoft.public.vsnet.general group dated 2006 (look for ‘Fatal Error C1003’): Hi, Unfortunately this 100 limitation is hard coded and cannot be changed. It’s just inpractical to keep all errors information around since one error may cause other several errors. I hope you … Read more