Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6936299
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:12:57+00:00 2026-05-27T12:12:57+00:00

My app needs useLegacyV2RuntimeActivationPolicy in its .exe.config because it is a CLR4 app that

  • 0

My app needs useLegacyV2RuntimeActivationPolicy in its .exe.config because it is a CLR4 app that uses mixed mode CLR2 assemblies.

All is well when starting our app from the Start Menu, but if a user starts our app by clicking on one of their files that has a file type association with our app, the app.config file is not being read and the loading of these CLR2 assemblies fails.

Based on further research, it appears that ShellExecute does not read the .config file (even when the app folder is specified), but WinExec does. I presume the shell uses ShellExecute for starting an app via file association.

Is there any workaround for this besides writing an intermediate app that sets the current folder before starting the main app’s process? This was suggested elsewhere on this site.

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T12:12:58+00:00Added an answer on May 27, 2026 at 12:12 pm

    Check that the file association registry settings use long filenames and not short filenames. For example, the command value here should use the long filename to open the document.

    HKEY_CLASSES_ROOT\MyFile.Document\shell\open\command

    My guess is that Windows does not expand the short filename into the long name when starting the application and tries to use the short name to resolve the app.config file which it then fails to find.

    Edit: I confirmed my theory by renaming the app.config with the matching short name found in the registry and then it worked. Removing the renamed app.config file again breaks it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Because the data size isn't little that my web app needs to load, it
I have an app that needs to read a PDF file from the file
We have an app that needs to access network resources. It's written in VB.Net.
I have an app that needs to be able use either an sqlite3 datebase
My app needs to have a intent-filter that responds to a Intent that has
My app needs to build a buffer from all the selected cells on a
I have an app that needs to check a database table every minute. The
My app needs to call pre-compiled AppleScripts periodically on a background thread . Because
My app needs to instantiate a WebView that displays the content of a page
My app needs to get data from a webpage that is in XML format.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.