You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -33,7 +34,20 @@ For intellisense to work it's recommended you add the following to the top of yo
33
34
34
35
By default, your `.cshtml.cs` files will be nested under their `.cshtml` counterparts this using the [File Nesting feature in Visual Studio](https://docs.microsoft.com/en-us/visualstudio/ide/file-nesting-solution-explorer?view=vs-2019) if your project is classified as an ASP.NET Core project.
35
36
36
-
If you have a console app or class library you can trick it by ensuring your `.csproj` file starts with `<Project Sdk="Microsoft.NET.Sdk.Web">`.
37
+
If you have a console app or class library you can trick it by ensuring your `.csproj` file starts with `<Project Sdk="Microsoft.NET.Sdk.Web">`. There are a couple of automatic behaviours you need to opt-out of though if you do that.
38
+
39
+
Either way you should add the following to the `.csproj`:
Note: if you have a console app that means you'll need to add a `launchsettings.json` file in your `Properties` folder with something like this so that F5 still launches the app rather than IIS Express:
39
53
@@ -46,3 +60,19 @@ Note: if you have a console app that means you'll need to add a `launchsettings.
46
60
}
47
61
}
48
62
```
63
+
64
+
### Class library
65
+
66
+
You should add the following to the `.csproj`:
67
+
68
+
```xml
69
+
<PropertyGroup>
70
+
<OutputType>Library</OutputType>
71
+
</PropertyGroup>
72
+
```
73
+
74
+
And add a `launchsettings.json` file in your `Properties` folder with something like this so that F5 doesn't launch IIS Express (it will fail, but it's meant to - it's a class library):
0 commit comments