Comments (3)
I have similar issue.
I noticed that the .csprog file used by dotnet-script is missing the tag <ImplicitUsings>enable<ImplicitUsings>
. I removed from my Webapi app and received the same wornings/errors during build.
I noticed that in dotnet script, the .csproj file re-generated. Is there a template somewhere that i can add this missing tag?
thx...
from dotnet-script.
That would be a nice to have feature in dotnet-script. Or perhaps it's there and I don't know how to set it.
Implicit usings are an SDK feature, not a compiler feature.
CSX scripts already include a bunch of usings by default out of the box (in fact scripting has done this before global usings even existed).
Can you explain the use case you have?
I noticed that the .csprog file used by dotnet-script is missing the tag enable. I removed from my Webapi app and received the same wornings/errors during build.
This is currently a limitation, but we will address this (see #694 (comment))
I noticed that in dotnet script, the .csproj file re-generated. Is there a template somewhere that i can add this missing tag?
The project file is generated to only load dependencies, implicit usings would have no effect here.
from dotnet-script.
I assume my use case may be unique.
In my case i'm previous c# (Windows) developer, now at a Ruby shop. Wanted to see how dotnet with c# might be a benefit. I assume ruby devs may be more comfortable with c# scripting. I compared writing a web app using scripting and a standard dotnet minimal web app both in c#. I found the minimal app a little 'cleaner'. For example given the extensive use of global usings prevented needing 'usings' in each c# file. For me not a big deal but for devs coming from a ruby background maybe more challenging. Was thinking of a way i could set all that up. I could add all/most of the libraries from Microsoft in advance.
Also using Visual Code, I had to refresh the intellisense extension all the time.
So for my particular use case i think scripting may not be the best option.
from dotnet-script.
Related Issues (20)
- What's a good way to read config values and secrets? HOT 3
- dotnet -h doesn't show script command HOT 1
- How to pass the NuGetInteractive option to dotnet script? HOT 1
- Reference to Microsoft.NET.Sdk.Web not work HOT 4
- Help with logging HOT 1
- Not getting environment from DOTNET_ENVIRONMENT variable HOT 1
- csx parsing problems HOT 5
- Cannot restore nuget packages if script location has %20 in path
- consider use ${userHome} instead while init HOT 6
- Shebang directive on top of the file breaks #r SDK parsing HOT 10
- Execution Speed HOT 12
- Getting "missing reference errors" in Visual Code and dotnet script. HOT 1
- support relative dll-file-path reference HOT 3
- Change target framework from `net7.0` to `net472` HOT 2
- Feature Request: Set exit code for script not found
- "User-Unhandled Exceptions" don't work in debugger
- System.IO.FileLoadException: Could not load file or assembly HOT 2
- syntax highlighting + intellisense not working for project created using `dotnet script init` HOT 4
- dotnet script Could not execute because the specified command or file was not found HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dotnet-script.