dotnet / orleans

Cloud Native application framework for .NET
https://docs.microsoft.com/dotnet/orleans
MIT License
10.06k stars 2.03k forks source link

Chirper.sln The sample error #7745

Closed wz172 closed 2 years ago

wz172 commented 2 years ago

I have rebuilt the solution and run the sample Server chirper. Server to get the following error

console show


info: Orleans.Runtime.Silo[100404] Silo starting with GC settings: ServerGC=False GCLatencyMode=Interactive warn: Orleans.Runtime.Silo[100405] Note: Silo not running with ServerGC turned on - recommend checking app config : -- warn: Orleans.Runtime.Silo[100405] Note: ServerGC only kicks in on multi-core systems (settings enabling ServerGC have no effect on single-core machines). info: Orleans.Runtime.Silo[100403] -------------- Initializing silo on host ATP-YQYF-793 MachineName ATP-YQYF-793 at 127.0.0.1:11111, gen 390553030 -------------- info: Orleans.Runtime.Silo[100415] Starting silo Silo_84de7 warn: Orleans.Runtime.NoOpHostEnvironmentStatistics[100708] No implementation of IHostEnvironmentStatistics was found. Load shedding will not work yet info: Orleans.Runtime.ConsistentRing.VirtualBucketsRingProvider[0] Starting VirtualBucketsRingProvider on silo S127.0.0.1:11111:390553030/xC4B35CE3. info: Orleans.Runtime.ConsistentRing.VirtualBucketsRingProvider[103003] Added Server S127.0.0.1:11111:390553030/xC4B35CE3. Current view: [S127.0.0.1:11111:390553030 -> <MultiRange: Size=x100000000, %Ring=100.000%>] info: Orleans.Runtime.ConsistentRing.VirtualBucketsRingProvider[103005] -NotifyLocalRangeSubscribers about old <(0 0], Size=x100000000, %Ring=100.000%> new <MultiRange: Size=x100000000, %Ring=100.000%> increased? True info: Orleans.Runtime.Silo[100422] -------------- Started silo S127.0.0.1:11111:390553030, ConsistentHashCode C4B35CE3 -------------- fail: Orleans.Runtime.Scheduler.OrleansTaskScheduler[101231] QueueWorkItem was called on a non-null context [SystemTarget: S127.0.0.1:11111:390553030*stg/13/0000000d@S0000000d] but there is no valid WorkItemGroup for it.


messagebox:
Orleans.Runtime.OrleansConfigurationException:“None of the assemblies added to ApplicationPartManager contain generated code. Ensure that code generation has been executed for grain interface and class assemblies.”

wz172 commented 2 years ago

I have run the program as an administrator,Don't know what's wrong with it. Is grain added this way


image


ReubenBond commented 2 years ago

I just tested the sample again locally and it worked for me, but I have an idea of what the issue might be. What folder is your code in on your computer? If you move it into a folder without spaces, does that work?

wz172 commented 2 years ago

first, Thank you very much for your answer. my code folder is 【F:\orleans-main\samples】 Yeah, it works fine on my colleague's computer. Does the framework depend on the operating system, and does it have any restrictions on the current user permissions of the operating system? I just copied the example to my F disk again and deleted all the files locked in the bin directory. After regenerating, I still failed to run the example. this is example grain Decompiled code image

Grain is missing some important class files in VS2022 [V17.2.0].

wz172 commented 2 years ago

The project seems to be working fine on my computer, I'm sure MsBuilder wasn't working when grain was being generated. My computer login account is not Administrator, and although I am running the program as administrator, the type to be used by the data transfer framework is not generated. image

This is a bug: since no error is reported in compiling code, if one grain is generated, but the other grain is not [OrleansGeneratedCore], running the server will not report an error. When the client obtains the grain, an error message is displayed and the corresponding grain cannot be found. Can this problem be exposed when compiled or loaded on the server side?

wz172 commented 2 years ago

Why do I get an error when I try to create a grain interface myself。 ![Uploading 屏幕截图 2022-05-19 115022.png…]()

wz172 commented 2 years ago

Why do I get an error when I try to create a grain interface myself。 image

wz172 commented 2 years ago

I git it,TThanks.