JLC
  •  JLC
  • 54.8% (Neutral)
  • YAF Forumling Topic Starter
2020-10-08T16:07:59Z
Have downloaded and successfully built all 18 projects in VS2019 on Windows 7. Go to run project in debugger and get the error:

Compiler Error Message: CS0101: The namespace 'Resources' already contains a definition for 'Install'

https://yetanotherforum....Cannot-install-YAF-Forum 

however, following the advice there really messes things up.
Screenshot from 2020-10-08 17-01-27.png

Click to View Image6 View(s)


Can anyone advise ?
Sponsor
tha_watcha
2020-10-09T16:33:21Z
Are you using the recommended.web.config?
UserPostedImage
JLC
  •  JLC
  • 54.8% (Neutral)
  • YAF Forumling Topic Starter
2020-10-09T16:36:25Z
As far as i could see it didn't come with one, so I renamed the v191.upgrade.web.config web.config.

If that's the cause then where do I get the base web.config ?

E2A: Duh ! I guess the file called "recommended.web.config" ?!?!

I'll rename that and try again.
JLC
  •  JLC
  • 54.8% (Neutral)
  • YAF Forumling Topic Starter
2020-10-09T17:03:02Z
No - still getting same error.
tha_watcha
2020-10-10T13:39:25Z
Hmh i dont no whats wrong, i downloaded the source and run the the solution without the error.,

What happens when you delete all Language files expect the english one Install.resx?
UserPostedImage
JLC
  •  JLC
  • 54.8% (Neutral)
  • YAF Forumling Topic Starter
2020-10-10T16:15:50Z
OK ..

So the build creates the hierarchy of language folders I would expect having taken a crash course courtesy of the internet :)

Under YetAnotheForum,NET\obj\debug there's a folder for each language. Each folder contains: YAF.resources.dll

Renaming the folder debug.old (which you have to do before the browser fires up, as it rebuild it) doesn't seem to do anything. Same error.

I was hoping (maybe as you were) if I could change the error to try and work out what part of the build is trying to load the multiple DLLs.

Because as things stand this error is a run time error that is thrown up before a single line of code gets run - part of the "fun" of dynamic linking I guess.

JLC
  •  JLC
  • 54.8% (Neutral)
  • YAF Forumling Topic Starter
2020-10-11T15:21:37Z
Just installed VS2019 onto another computer (Windows 7 again) and got exactly the same error and message.

So for some reason that's 2 machines that can't run the project in debug (if at all).

I'm going to give up at this point. I only wanted to get some non-trivial ASP.NET C# coding practise. not sort out VS2019. (I last coded in anger in 2010, and it's hilarious how little has changed since then. Certainly the sensitivity of VS ... )
JLC
  •  JLC
  • 54.8% (Neutral)
  • YAF Forumling Topic Starter
2020-10-12T09:00:39Z
Right.

So after running the project and looking at the error I located the offending file in ~\Temporary ASP.NET\x\y\<filename>.1.cs. On inspection it was built from the "install.resx" file.

I then noticed there was a ~\Temporary ASP.NET\x\y\<filename>.0.cs on inspection it was built from the "install.iw.resx" file.

So I deleted "install.iw.resx from the project, rebuilt and reran and have now advanced to what I was expecting to see - a nice error page about SQL missing (which at the moment it is). But at least the project is working.

Just to check my working, I went over to the second machine I installed with VS2019 and the YAF project, deleted "install.iw.resx" from it's solution, rebuilt, reran and - bingo. It too opened a nice error page.

So somehow the presence of that file seemed to be screwing up a build order or something.

It's a little bit disarming having to use 35 year old hacking experience in 2020 🙂
tha_watcha
2020-10-12T09:14:06Z
Originally Posted by: JLC 

Right.

So after running the project and looking at the error I located the offending file in ~\Temporary ASP.NET\x\y\<filename>.1.cs. On inspection it was built from the "install.resx" file.

I then noticed there was a ~\Temporary ASP.NET\x\y\<filename>.0.cs on inspection it was built from the "install.iw.resx" file.

So I deleted "install.iw.resx from the project, rebuilt and reran and have now advanced to what I was expecting to see - a nice error page about SQL missing (which at the moment it is). But at least the project is working.

Just to check my working, I went over to the second machine I installed with VS2019 and the YAF project, deleted "install.iw.resx" from it's solution, rebuilt, reran and - bingo. It too opened a nice error page.

So somehow the presence of that file seemed to be screwing up a build order or something.

It's a little bit disarming having to use 35 year old hacking experience in 2020 🙂



The file has the wrong language code. it should be install.he.resx. Then it should work. I was already suspecting that file. Issue will be fixed in the next update


UserPostedImage
JLC
  •  JLC
  • 54.8% (Neutral)
  • YAF Forumling Topic Starter
2020-10-12T09:26:36Z
Originally Posted by: tha_watcha 


The file has the wrong language code. it should be install.he.resx. Then it should work. I was already suspecting that file. Issue will be fixed in the next update



I must admit, when it ran, I did wonder "What country is IW" 🙂

Anyway, on with the refresher in ASP.NET. Quite a baptism of fire ...
tha_watcha
2020-10-12T14:30:48Z
Originally Posted by: JLC 

a nice error page about SQL missing (which at the moment it is).



Where you able to resolve the issue? Or what error are you getting? Also which version have you downloaded?


UserPostedImage
JLC
  •  JLC
  • 54.8% (Neutral)
  • YAF Forumling Topic Starter
2020-10-12T14:38:24Z
Originally Posted by: tha_watcha 

Originally Posted by: JLC 

a nice error page about SQL missing (which at the moment it is).



Where you able to resolve the issue? Or what error are you getting? Also which version have you downloaded?



Oh, no problem 🙂 Just installed SQL Express 2014, setup a YAF user and database, create the connection string and I've been cooking with gas.

I feel a bit guilty, as I'm not really intending to use YAF for anything other than a get-back-up-to-speed project into C# and (more importantly) ASP.NET 4.8

The reason I posted the original query was the fact that despite some serious Googling, no one else in the universe appears to have ever encountered it and felt it worthy of posting. Now I've fixed it (and renaming install.iw.resx to install.he.resx did indeed fix it) then I'm going to presume there was an issue with some sort of VS convention about the naming and location of resource files, and VS2019 really doesn't like resource files with a non-existent two-letter code, only it likes to keep it a secret ?

Many thanks for your time and replies.

It's all grist to the cv (US: resume) anyway !

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved