AddAnyFile icon indicating copy to clipboard operation
AddAnyFile copied to clipboard

Visual Studio no longer knows that a file has been added

Open JwanKhalaf opened this issue 6 years ago • 3 comments

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

  1. Create a new file (e.g. a viewmodel.cs) through the extension
  2. Try to make use of the ViewModel in the controller
  3. 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.

JwanKhalaf avatar Sep 18 '19 10:09 JwanKhalaf

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">

chucker avatar Sep 18 '19 11:09 chucker

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">

JwanKhalaf avatar Sep 18 '19 11:09 JwanKhalaf

Hello I need to make a module in which the VS ADD ME a newly created FILE. Can someone help me ? Thank you

rodolfolp avatar Apr 24 '20 22:04 rodolfolp