-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Runtime Store] conflict with dotnet command line #61103
Comments
Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov Issue DetailsHi, I've set up my own runtime store with custom assembly build in dotnet standard 2.0. This work well in visual studio and my custom hosted assemblies are well executed on my dotnet 5 projects within my IDE. PS C:\temp\ttep> dotnet publish Can you tell me the reason why "dotnet" command line will encountered this error (and not my built process)? And what are recommandations so that runtime store would apply on the running program, and not dotnet command? Many thanks in advance for your help. Regards,
|
The store should only apply to Also out of curiosity: What is the scenario you need the store for? (It's not a frequently used feature with several pretty big limitations, so I'm trying to figure out what scenarios it does solve). |
Hi @vitek-karas , Well my store is built following the procedure described here:
What do you think of that? From my understanding, runtime store is designed to inject behavior and enhance code without having to add references inside our project (as it can be done thanks to CLASSPATH in Java). So this is a very powerful feature, since it let us to adapt a component behavior according to its hosting environment. To answer directly to your last question, my present use case is: On different environments, these keys (like MyXLDeployKey) are replaced at deploy time by XLDeploy, but on dev workstation, this is lot of risky work to replace all of this token to the appropriate environment. |
I haven't played with this for a while, but I think the problem is actually not the store but the An alternative solution to the problem might be to use startup hook. It would also apply to all .NET processes, but this might give you more control over loading the dependencies. You would just have to specify an absolute path for the startup hook itself. In it you could then check if the process it's running in is "interesting", if not it would just do nothing. If it was interesting it would then go a load additional code or do other things. Note that it is still problematic to set the env. variable globally on the machine even for startup hooks. As it would be loaded into any app - so if the versions don't match, it would still fail. Currently I can't think of a robust enough mechanism which would let you globally register something which could affect any .NET app on the machine without it causing problems at least in some cases. |
Hi @vitek-karas , Many thanks for your answer. I tried startup hook today, and it met my needs perfectly; it is much simpler to use than runtime store I don't get problem with dotnet commands. Thanks again! |
Hi,
I've set up my own runtime store with custom assembly build in dotnet standard 2.0. This work well in visual studio and my custom hosted assemblies are well executed on my dotnet 5 projects within my IDE.
Howerver, as long as my "runtime store" env variables (DOTNET_ADDITIONAL_DEPS, DOTNET_SHARED_STORE) are set, i am not able to use "dotnet" command line anymore and i get such this error:
PS C:\temp\ttep> dotnet publish
Error:
An assembly specified in the application dependencies manifest (MyAssembly.deps.json) was not found:
package: 'My.Assembly', version: '1.0.8'
path: 'lib/netstandard2.0/My.Assembly.dll'
Can you tell me the reason why "dotnet" command line will encountered this error (and not my built process)? And what are recommandations so that runtime store would apply on the running program, and not dotnet command?
Many thanks in advance for your help.
Regards,
The text was updated successfully, but these errors were encountered: