Giter Site home page Giter Site logo

Comments (3)

mmarvb8h avatar mmarvb8h commented on June 22, 2024

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.

filipw avatar filipw commented on June 22, 2024

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.

marvfinsy avatar marvfinsy commented on June 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.