Microsoft.VisualStudio.Diagnostics.ServiceModelSink.Behavior Error in Windows 11 Ins.Prev, VS2022

Soykan Ozcelik 0 Reputation points
2023-04-26T06:30:35.93+00:00

Hi All,
I have a trouble since last days approx since last Windows updates.  I am using Windows 11 Pro Insider Preview Build 25336 rs_prerelease_230403.1234 (latest) under MacOS Ventura via Parallels Desktop.

This error occurs at Error List Visual Studio 2022
Warning \Mac\Home\Projects\SOYKAN\WEB_SITES..........\Default.aspx: ASP.NET runtime error: The type 'Microsoft.VisualStudio.Diagnostics.ServiceModelSink.Behavior, Microsoft.VisualStudio.Diagnostics.ServiceModelSink, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' registered for extension 'Microsoft.VisualStudio.Diagnostics.ServiceModelSink.Behavior' could not be loaded. (C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config line 238) ...Mobile \Mac\Home\Projects\SOYKAN\WEB_SITES.........\Default.aspx 1

I can build-compile-rebuild not problem but reason this error, markup pages didn't recognizing controls as you'll see attached picture.

I saw some suggestions somewhere when I Googled that
-uninstall-reinstall dot net version but 4.0 is already built in W11
-delete related row from machine.config (but when I delete it VS2019-2022 is unstable)

How can i solve this problem?![thumbnail image 1 of blog post titled

						Microsoft.VisualStudio.Diagnostics.ServiceModelSink.Behavior Error in W11 Insider Prev, VS2022
						
					
				
		
	

		

](/api/attachments/c89cb480-c38e-43e9-8a02-ab6b9cbf23ab?platform=QnA)

Windows for business | Windows Client for IT Pros | User experience | Other
Developer technologies | Visual Studio | Other
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Anna Xiu-MSFT 31,056 Reputation points Microsoft External Staff
    2023-04-26T08:00:50.39+00:00

    Hi @Soykan Ozcelik, 

    Welcome to Microsoft Q&A! 

    What is your project type? Have you tried to reboot your machine? 

    Please update your Visual Studio to the latest version with Visual Studio Installer.

    Besides, you can open Visual Studio Installer > Modify > select Individual components tab > install/reinstall Windows Communication Foundation component.

    Sincerely,

    Anna


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

  2. Soykan Ozcelik 0 Reputation points
    2023-04-26T08:31:16.3366667+00:00

    What is your project type? Have you tried to reboot your machine?
    AspNet Web Form, yes

    I'll update VS to latest version and also install/reinstall Windows Communication Foundation component but what about relation with my problem with WCF?

    0 comments No comments

  3. Limitless Technology 44,776 Reputation points
    2023-04-26T11:33:18.75+00:00

    Hello there, This looks like an issue with your machine.config. Microsoft.VisualStudio.Diagnostics.ServiceModelSink.Behavior is a wcf behavior that enables wcf debugging features inside visual studio, and it loooks like something removed the behavior extension from your machine configuration without removing the references to it in common endpoint and service behaviors. If the dll (Microsoft.VisualStudio.Diagnostics.ServiceModelSink) is installed on your computer (should be in the Global Assembly Cache if so, \windows\assembly), then you should be able to add the extension element back into your machine .config: Similar discussion here https://social.technet.microsoft.com/Forums/windows/en-US/313e9268-229b-4bb2-8c5f-81881335be5c/what-is-microsoftvisualstudiodiagnosticsservicemodelsinkbehavior-doing-in-azure-web-role?forum=windowsazuredevelopment Hope this resolves your Query !! --If the reply is helpful, please Upvote and Accept it as an answer--

    0 comments No comments

  4. Soykan Ozcelik 0 Reputation points
    2023-04-26T12:49:19.8266667+00:00

    it seems related dll (Microsoft.VisualStudio.Diagnostics.ServiceModelSink) is not installed on my computer.

    Should i installed it? i have no any issue about WCF and wcf debugging.
    User's image

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.