I'm getting the “missing a using directive or assembly reference” and no clue what's going wrong

后端 未结 8 811
鱼传尺愫
鱼传尺愫 2020-11-29 06:29

I\'m trying to allow a user to enter data into a textbox that will be added to the web.config file. I\'ve added the relevent lines to the web.config file but when I make thi

8条回答
  •  一向
    一向 (楼主)
    2020-11-29 07:00

    I had the same problem earlier today. I could not figure out why the class file I was trying to reference was not being seen by the compiler. I had recently changed the namespace of the class file in question to a different but already existing namespace. (I also had using references to the class's new and previous namespaces where I was trying to instantiate it)

    Where the compiler was telling me I was missing a reference when trying to instantiate the class, I right clicked and hit "generate class stub". Once Visual Studio generated a class stub for me, I coped and pasted the code from the old class file into this stub, saved the stub and when I tried to compile again it worked! No issues.

    Might be a solution specific to my build, but its worth a try.

提交回复
热议问题