I am having a couple issues using VS 2012 with the ServUO project.
First of all it will start telling me I have duplicates of files in all my folders. So far If I remove the folders and re-add them to the project this fixes the duplication, but this is a long and tedious fix.

Next it appears that on occasion VS 2012 will truncate some of y CS files. Everything will be running smoothly then all of a sudden files will start telling me they expect ; and }. when I go look at these error locations, it appears half the cs file is missing. These are files that i have not touched and if i look at previous versions of the file they are fin and in tact.

Any ideas?
 
Have you tried cloning from the repo and testing with a fresh setup? I have not ran into any issue like the one you're having but it almost sounds like your repo is incomplete for some reason.
 
Have you tried cloning from the repo and testing with a fresh setup? I have not ran into any issue like the one you're having but it almost sounds like your repo is incomplete for some reason.

Turns out that I did add some incomplete files and just didn't notice. But i still have phantom duplicates!
 

Attachments

  • anicegoodies.files.wordpress.com_2015_10_ultimaonline_landfall_blacksmith_more.png
    anicegoodies.files.wordpress.com_2015_10_ultimaonline_landfall_blacksmith_more.png
    224 KB · Views: 1
  • anicegoodies.files.wordpress.com_2015_10_ultimaonline_landfall_blacksmith.png
    anicegoodies.files.wordpress.com_2015_10_ultimaonline_landfall_blacksmith.png
    196.2 KB · Views: 1
Next time you get duplicates, try closing VS and open the solution again. Tell me if it still shows them. Pretty odd issue. :/
 
Next time you get duplicates, try closing VS and open the solution again. Tell me if it still shows them. Pretty odd issue. :/

Yep., duplicates still. It is looking like a git issue maybe merging the csproj files incorrectly and making duplicate entries. Still looking into this a little further to see if I can pinpoint it and stop it from happening.
 
Git bash. I've been using git for a couple years this way and all as been fine.
Wierd thing is I never had this problem until I started using VS 2012.
 
It's hard to tell, on my laptop only the new files I added are duplicated, when I pull to my desktop it looks like everything is duplicated.
 

Attachments

  • as8.postimg.org_iyijtl6md_Harvest_Preview.png
    as8.postimg.org_iyijtl6md_Harvest_Preview.png
    578.4 KB · Views: 169
Ah, so it's doing this after you commit/push/pull. You should revert the changes to your solution file. I believe we have it locked in the ServUO repo. We use a universal solution file that includes all source files within a directory. Sounds like VS is adding it's own entries for new files you add from within VS. Thus the solution is loading the file into the solution once because it's within the directory, and again because the new entry VS added. Compare the solution files and you'll see what I mean.
 
Indeed! so the original csproj file only has

Code:
<ItemGroup>
	<Compile Include=".\**\*.cs" />
  </ItemGroup>
  <ItemGroup>
	<Content Include=".\**\*.txt" />
  </ItemGroup>

However my csproj has like 4k lines of entries for specific file names.
How do I make it so that it does not change? should I rectify the issue then remove the csproj from git tracking? You said you had your locked down some how?
 
Yeah, you could remove it from being tracked by git. Or simply avoid committing changes to that file. I don't believe git supports file locking. If you revert the file, does it fix your issue?
 
Indeed it does!

So if I take git tracking out of the equation how do I get VS2012 to stop adding files to the csproj file? or do I just need to re-write the csproj file evertime?
 
OK I have this thing solved, it's just a workflow issue:

I am used to adding and removing files directly inside the project in Visual Studios. I am not sure if this is strictly a VS2012 thing, but as ong as I add and remove files and an OS level instead of a VS level everything remains copacetic.

Thanks for your help Insanity!
 
Not a VS issues. It's an issue related to the special solution file we use. It's made to read everything, instead of include each and ever file. This allows one to drop a new system in, open the solution; and the system be there in the project.

Your solution works, unless you're creating a new class. You'll still have to roll back changes that VS will do to the solution.

Honestly, VS shouldn't add the same file (same path and all) twice to the same project. Not sure why it even allows it...
 
Back