ā Error CS0579
Error CS0579 Duplicate 'System.Reflection.AssemblyVersionAttribute' attribute PacktLibraryNetStandard2 C:\cs11dotnet7\Chapter05\PacktLibraryNetStandard2\obj\Debug\net7.0\PacktLibraryNetStandard2.AssemblyInfo.cs
40 Replies
Read the message. It says you have two assembly version attributes in the same assembly, and that's not allowed
what is mean assembly version?
Actually I'm learning C# using markjprice's book and stuck here.
That's not really important atm. What is important is that you have two of them.
An attribute looks like this:
[assembly: AssemblyVersion()]
It's not in the csproj files.
Check your .cs files
I have only this one cs file
You also have a directory called classlib
What's in there?
bin and obj folder
can you join meet or zoom?
What? But it's included in your project source, according to your screenshot
No I cant
Please help me I'm trying since last 3 days
So why showing this error
Something is fucked with your project setup, I suggest starting from scratch
Especially since you have no code written yet
I'm on a buss right now typing on my phone, I can not join a screen share ATM ;p
I have not written any single line yet
Following this
Ok so start over with a fresh project
Because you seem to have included the child project in your primary project
And that is not allowed
In fact, if you just delete the classlib project entirely, then delete the classlib folder
It will probably worn
Work
Maybe you have to say I don't have to add classlib project in PacktLibraryNetStandard2. I have to make it saperate
Yeah in a way
You can't have a project live inside another projects folder
They need to be separate
And reference eachother via csproj instead
Then why in this book written like this? Is this book saying wrong
Without checking, I think you misunderstood the book
They can live next to eachother, but not one inside the other
Okay I'm trying all again
It's just worked Thanks a lot brother I was trying since last 2-3 days. So grateful for you š š š š
this is roughly the structure you should use for your projects š
you can skip the
src
and test
levels if you want, but the you MUST have a separate folder for each project
they can never live under eachotherwhat is .Lib
I am totally new for .net
learning C# right now.
that would be your "classlib" project
its pretty common for larger codebases to be split into several projects
What is you current profession?
I'm a senior developer for a healthcare software firm, specializing in .NET development and I also help out with devops/ops, meaning taking care of our kubernetes cluster.
I'm student first learned Python Django. and understood My interest is more in Software dev than ML & AI. SO, learning C#, .NET
do we use .net for IOS, Android and MacOS developnment?
what is the meaning of alias? I am confused about it.
You can but I've never personally made a serious multi-platform mobile app. I tend to use kotlin when I make android stuff (for myself, for fun).
for macOS, .NET is perfectly fine.
same with linux
can you provide some more context?
the word "alias" just means "another word for the same thing"
Okay. This word used so many in C# book
did you developed any UI using .NET
Yes, mostly using WPF
but never anything for a professional product, only in-house tooling
UI is not my strong suit š
this can shine in your Resume
what?
I'm not showing you my CV, no.
Not really. On my local job market, .NET is almost exclusively used for backend web development
Ohh!
so if you have WPF experience, great for you, but its really not going to help much for MOST jobs
for the ones that are desktop client work, its a HUGE boost ofc
Maybe .NET don't have big market
How big is your org?
it does. How big varies by where you are, but its way bigger than Java where I am for example
Small, we're... 19 devs atm.
I much prefer a smaller company over a huge one
How much yrs is your experience
~11-12 or so professional, but I've coded for 25 years or so
so experienced
The aliases represent pointers to the integer value in memory, which is why their .NET names are
IntPtr and UIntPtr.
alias
.. why are you reading about
IntPtr
? its almost never used in C# outside of lowlevel or interop with C/C++I don't know it's given in the book
Actually I don't have anyone to discuss except you and that book
Even I don't know why this IntPtr used
Do you know anything about MSSQL sever
I am learning MSSQL I am unable to join my server with database
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.