2

I'm trying add some code from another project into the windows form application project by copying and pasting a folder. (the folder contains some .cs files). However, I cannot see the project in the solution explorer and I cannot use any of those codes. This copy-paste process works for C# console application but it doesn't work for windows form applications.

How can I add the codes into the project?

aybe
  • 15,516
  • 9
  • 57
  • 105
Dev777
  • 33
  • 3

1 Answers1

1

Most probably because you're using .NET Framework VS .NET Core:

On these, additionally to copying files, you must include them in the project with Add Existing Item:

enter image description here

On these, copying files to directory will be sufficient:

enter image description here

In short, they use a newer, improved format of .csproj.

aybe
  • 15,516
  • 9
  • 57
  • 105