Page 1 of 1
'File' is an ambiguous reference between 'ASPNETMaker2024.Entities.File' and 'System.IO.File'
Posted: Thu Sep 05, 2024 6:07 am
by crash
I'm getting a new error on script generation, build fails.
Have cleared folder, regenerated, removed all tables, shut down but stills fails to generate.
It seems this has happened since recent temple update
\ASPNETMaker2024\Test\Models\aspnetfn.cs(4799,73): error CS0104: 'File' is an ambiguous reference between 'ASPNETMaker2024.Entities.File' and 'System.IO.File'
Any help please.
Re: generation error
Posted: Thu Sep 05, 2024 7:41 am
by MichaelG
Rename your "File" table (say to "MyFile") in the database and sync the project.
Re: 'File' is an ambiguous reference between 'ASPNETMaker2024.Entities.File' and 'System.IO.File'
Posted: Thu Sep 05, 2024 10:04 am
by crash
I don’t have a table called file and no field called file..
Thanks
Re: 'File' is an ambiguous reference between 'ASPNETMaker2024.Entities.File' and 'System.IO.File'
Posted: Thu Sep 05, 2024 12:55 pm
by MichaelG
You probably have a table called "Files". You can also try to add an entry in C:\Users\<user>\AppData\Roaming\ASPNETMaker2024\src\keyword.xml:
<keyword lang="ASPNETMaker" value="File"/>
Re: 'File' is an ambiguous reference between 'ASPNETMaker2024.Entities.File' and 'System.IO.File'
Posted: Fri Sep 06, 2024 10:38 pm
by w.saeed
the reason is "File" object has two references the first one is 'ASPNETMaker2024.Entities.File' and the scond one is 'System.IO.File' ratherfor, your app ambiguous to chose which one of them as refernce
so go to globale use driver and spacify which package that you want to use.
global using GLOBALS =ASPNETMaker2024.Entities.File;