Git Product home page Git Product logo

spdevenvreset's Introduction

Reset your SP Development Environment, preserve sanity!

How?

  1. Read the source for the PS1 script. I could be a very terrible script kiddie trying to hax yoo, or worse, I could be incompetent.
  2. Download the PS1 script and drop it somewhere. Anywhere. I have mine off the C root because I am a terrible person.
  3. Run the PS1 script in powershell. It will spawn an elevated shell if you did not already run it as such, and UAC will ask you for permission to do that.

Optional steps

You can use the shortcut (.lnk) I provided and update the path to wherever you put the script. You can place this shortcut in your start menu to make it really easy to run.

If you are working with timer jobs, I suggest that beyond this script, you also reset the timer job after every deployment. To do this, go into your SharePoint deployment project, open the project properties, navigate to the SharePoint tab, and then set the post-deployment step to:

net stop sptimerv4

net start sptimerv4

Why did you make this?

This StackExchange issue was really starting to annoy me so I had to come up with some way of scripting this.

There are still times that my SharePoint environment gets confused and I need to manually retract the solution in Visual Studio prior to running the reset script. At least twice a week I'm happy I have this script around. It gets that crazy when you're developing timer jobs!

What do I need to run this?

You will need at least PowerShell 4 as the self-elevating commands require that. If you comment out that line then you should be good with PowerShell 2.

It has been tested with the following configurations:

Visual Studio 2013 / 2015 / 2017

SharePoint 2010 / 2013 / 2016

Though there are some commented services that if uncommented will probably require SP 2016.

I'm still having problems deploying!

This isn't a silver bullet. You'll still need to earn your paycheck, unfortunately. I wish PowerShell was powerful enough to replace me sometimes.

If you're having issues related to that StackExchange link above, make sure all your Elements.xml files have the right namespace. If you're having other issues, I cannot recommend SharePoint.StackExchange.com enough. Start a new thread, and start a discussion here on my repository with your specific issue so I can see if I can integrate the solution into this script.

spdevenvreset's People

Contributors

jyarbro avatar

Watchers

 avatar

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.