Visual Studio no longer knows that a file has been added
Installed product versions
- Visual Studio: Community 2019 (version 16.2.5)
- This extension: 3.5.134
Description
When I add a new file through the extension, the file doesn't get recognised by Intellisense, so I have to restart Visual Studio, then it picks up the new file and I can continue.
Steps to recreate in MVC application
- Create a new file (e.g. a viewmodel.cs) through the extension
- Try to make use of the ViewModel in the controller
- Visual Studio doesn't know that file eixsts, it doesn't suggest adding the reference or anything like that.
Current behavior
Visual Studio doesn't know about the file/class, it doesn't suggest adding the reference when I try to make use of the file in another class.
Expected behavior
Visual Studio should know of the new file/class and should prompt me to add a reference to it when I try to use the file in another class.
Is this an Sdk-style project?
Does the csproj file start something like:
<Project Sdk="Microsoft.NET.Sdk">
Or more like:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
I just inspected the .csproj file. It begins like so:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
Hello I need to make a module in which the VS ADD ME a newly created FILE. Can someone help me ? Thank you