✅ C# CS0246
Following https://www.youtube.com/watch?v=YV16JmCGNZA&list=PLABAnZRsrrL4xoeLvEmqtayeRC5b5GuwU&index=5&ab_channel=MariyanDeveloper
At 13;06
The SimpleForm() has an error of CS0246,
I have added
-> using System.Windows.Forms;
but still does not work
Can somebody help? (edited)
Mariyan Developer
YouTube
Revit API Course for beginners | Lesson 3 | Element Selection
In this lecture you will learn about selection of Revit element via its API. We will discover what is the main class for doing it and how to use it.
I hope you enjoy the session and learn something new! Feel free to comment any feedback/questions below, or follow my channel if you enjoyed this.
If you want to get online classes text me on insta...
24 Replies
CS0246
is
the type or namespace name 'type/namespace' could not be found (are you missing a using directive or an assembly reference?)could you perhaps say what type/namespace the error is giving you? and show your
.csproj
fileSorry im extremely new to C# and codinig in general can you guide me where .csproj is?
i think i found it
This is a .NET Framework project. .NET Framework is really old and outdated, and should not be used for new projects or learning without very good reason.
The last version of Framework was made in 2016
Its supposed to be used in conjunction with ReVit to make API Plugins
Its what im given to use
Ugh
Okay, I'd strongly urge against learning C# via this method
but you do you
This line indicates that you don't have a type called
SimpleForm
importedI have no idea what im doing too, i was originally from C++ then my school pushed C# on to my entire cohort...
C# is a great language, but using a 6 almost 7 year old version of it is a bit silly
SimpleForm
isn't anything I've ever heard of before
so its either something related to ReVit, or you are supposed to make it yourselfUsercontrol was replaced with SimpleForm
<Compile Include="SimpleForm.cs" />
Then another error appeared
I followed the video wrongly
<Compile Include="SimpleForm.xaml.cs">wait what If this is winforms, you can't use xaml Yeah you've made a pretty big mistake somewhere I think your SimpleForm was created as a WPF window, not a winforms form
Yes WPF
They said to use WPF...
.. okay
Then why are you talking about
using System.Windows.Forms;
thats the winforms namespace, which is a different GUI toolkitI was looking in the comments section and a poster said to include it, and i did what they said...
¯\_(ツ)_/¯
You do you.
You're following an old tutorial, for an old project, based on an outdated framework.
Nvm...
I found my error...
How do i close this
$close
Use the /close command to mark a forum thread as answered