Home > Software design >  ASP.NET Core Web App and windows form app give different results on service references
ASP.NET Core Web App and windows form app give different results on service references

Time:02-26

I try to add service references on ASP.NET Core Web App. That results app reference.cs file is mostly missing, classes are empty etc and only 100 lines.

But -even in same solution- if i try to add the same service reference in windows form app, all methods, interfaces and classes are completely correct.

If i try to add web references in ASP.NET, theres no missing but i need to use WCF.

I try to copy other references file and paste it but it wont work.

What did i miss?

Note: I already check this answer and subject but it will not work first time and question isnt same. My reference.cs file isnt empty,and also theres no change even i try 100 time it will be the same output - this question pointed coincidence - so it is NOT duplicate question. Thanks.

CodePudding user response:

After 5-6 hours thanks to this beautiful answer - actually i tried this before - and with my add ons, i figure it out.

  1. Delete the reference - right click and delete -
  2. Check file explorer, make sure no files in Connected Services.
  3. While your project is highlighted, right click on project and select clean
  4. After all of that, add your service reference and -just like the answer said- make sure reuse types in referenced assembles is not checked.
  • Related